# Toast > Non-intrusive notification messages Source: https://shellui.dev/docs/v0.4/components/data-display/toast The Toast component displays brief, auto-dismissing notifications. Use toasts for success confirmations, error alerts, or informational messages that don't require user action. ## Installation ```bash shellui add toast ``` ## Basic Usage ```razor @code { private bool showToast = false; } ``` ## Variants ### Default ```razor @code { private bool show = false; } ``` ### Destructive ```razor @code { private bool show = false; } ``` ### Success ```razor @code { private bool show = false; } ``` ### Warning ```razor @code { private bool show = false; } ``` ## Position Control where toasts appear on screen: ```razor
@code { private bool show = false; private bool show2 = false; } ``` ## Duration A toast hides itself after `Duration` milliseconds (5 seconds by default). Set `Duration="0"` to keep it open until it's closed. ```razor
@code { private bool quick; private bool sticky; } ``` ## With Custom Content ```razor

Version 2.0 is now available.

@code { private bool show = false; private void HandleUpdate() { show = false; } } ``` ## Multiple Toasts Stack multiple toasts with a service pattern: ```razor @code { private bool successVisible = false; private bool errorVisible = false; private void ShowSuccess() => successVisible = true; private void ShowError() => errorVisible = true; } ``` ## API Reference | Property | Type | Default | Description | |----------|------|---------|-------------| | `IsVisible` | `bool` | `false` | Controls toast visibility | | `IsVisibleChanged` | `EventCallback` | — | Callback when visibility changes | | `Title` | `string?` | `null` | Toast title | | `Description` | `string?` | `null` | Toast description text | | `Variant` | `string` | `"default"` | Visual style: `default`, `destructive`, `success`, `warning` | | `Position` | `string` | `"bottom-right"` | Screen position: `top-left`, `top-right`, `bottom-left`, `bottom-right` | | `Duration` | `int` | `5000` | Milliseconds before the toast hides itself; `0` keeps it open | | `ChildContent` | `RenderFragment` | `null` | Custom content | | `Class` | `string?` | `null` | Additional CSS classes | ## Accessibility The Toast component includes: - `role="status"` with `aria-live="polite"` for screen readers - Close button with `aria-label` - Auto-dismiss with configurable duration - Keyboard dismissible via close button - Respects `prefers-reduced-motion`