ComponentsToast
Toast
Show success or error feedback in a chosen position in the browser window.
Setup
Download the shared Inlay assets once. Then choose HTML, React, or Vue and copy the example above.
Toast with an action
Offer a timely recovery action alongside the confirmation.
Stack, position, and timeout
Open both notifications to see the shared stack. The upload confirmation dismisses after six seconds of idle time. The Undo action stays until dismissed.
Usage
| Delivery | Use a persistent status region for announcements. Opening a toast leaves focus on the triggering control. |
|---|---|
| Actions | Action toasts remain visible until dismissed. Handle the bubbling ilui:toast-action event to connect the action. |
| Stack and timing | Give each toast a unique ID and point its trigger at it using aria-controls. Set data-ilui-toast-duration in milliseconds for a nonessential message. Pause the countdown while a pointer or keyboard focus is within the stack. |
| Tone | Use ilui-feedback--success or ilui-feedback--danger on the same toast markup. To share one trigger, match the data-ilui-toast-tone-control option values to data-ilui-toast-tone on each message. |
| Position | Choose top or bottom with start, center, or end on the shared viewport. Start and end follow the writing direction. |