Toast

Show success or error feedback in a chosen position in the browser window.

Example

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.

Example

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.

Example

Usage

DeliveryUse a persistent status region for announcements. Opening a toast leaves focus on the triggering control.
ActionsAction toasts remain visible until dismissed. Handle the bubbling ilui:toast-action event to connect the action.
Stack and timingGive 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.
ToneUse 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.
PositionChoose top or bottom with start, center, or end on the shared viewport. Start and end follow the writing direction.