Docs Components
Toastexperimental
A quiet confirmation that slides in at the bottom right and leaves after five seconds. Destructive actions ride along with an Undo — everyone gets a grace period.
API
| Prop | Type | Description |
|---|---|---|
useToast() required | hook | Returns toast({message, tone?, action?}); requires ToastProvider at the app root. |
tone | string | Stripe color only — the message text carries the meaning. |
action | {label, onAction} | One optional action, typically Undo. |
Design specifications
- surface
color-bg-raised - border
color-border-rule - shadow
elevation-plate-md - stripe
color-status-{tone}-text (width space-1) - layer
layer-toast - font
type-body-sm
Guidelines
- shouldEvery destructive or bulk action SHOULD confirm via a toast with Undo.
- mustToasts confirm outcomes ('Published'), they never ask questions — questions are dialogs.
- must-notNever stack more than one action in a toast.