Toast
Transient notifications for confirmations, warnings, and system messages without interrupting the flow.
API
All inputs and configuration options for zyra-toast-container.
| Prop | Type | Default | Description |
|---|---|---|---|
toast.success() | (title, options?) => void | - | Show a success toast via ZyraToastService |
toast.info() | (title, options?) => void | - | Show an info toast |
toast.warning() | (title, options?) => void | - | Show a warning toast |
toast.error() | (title, options?) => void | - | Show an error toast |
options.description | string | - | Secondary body text below the title |
options.duration | number | 4000 | Auto-dismiss delay in milliseconds |
Accessibility
Built to meet WCAG 2.0 AA. These notes cover the key ARIA, keyboard, and interaction behaviours.
- Toast container uses role="region" with an aria-label for screen reader announcement
- Success/info toasts use aria-live="polite"; error toasts use aria-live="assertive"
- Each toast includes a visible dismiss button with an accessible label
- Toasts do not auto-dismiss during keyboard navigation to prevent losing context