Feedback
Toast
Displays temporary accessible status feedback with action triggers, viewport stacking, and anchored positioning.
idle
Usage
Examples
In context
With status
Success, error, information, and warning feedback.
With varying heights
Reveal three cards, then hover or focus to expand the stack.
Promise
Loading changes into a success or error notice.
Recommendations
| Guidance | Practice |
|---|---|
| Do | Mount ToastProvider once at the app boundary. Add AnchoredToastProvider for anchored feedback. Examples use their shared managers. |
| Do | Report the outcome of an action in a short message. Offer a relevant recovery action when available. |
Usage boundaries
| Guidance | Boundary |
|---|---|
| Scope | Keep critical errors and required decisions on the page. Toasts are temporary feedback. |
API reference
Public props from @mizen-labs/ui. Use exported prop types for the complete TypeScript contract.
| Prop | Type | Default | Description |
|---|---|---|---|
| | — | Application elements wrapped by the toast provider. |
| | "bottom-right" | Sets the screen corner or edge where stacked toasts appear. |
| | — | Properties forwarded to the portal wrapping the toast viewport. |
| | — | Custom toast manager instance overriding the default singleton manager. |
| | — | Custom toast manager instance overriding the default singleton manager. |
| | 5000 | Duration in milliseconds before a toast automatically dismisses. |
| | 3 | Maximum number of visible stacked toasts displayed simultaneously. |
| | — | Context provider managing viewport rendering for stacked toast notifications. |
| | — | Context provider managing anchor-positioned contextual toast popups. |
| | — | Imperative manager for add, update, close, and promise operations on stacked toasts. |
| | — | Imperative manager for add, update, close, and promise operations on anchored toasts. |
| | — | Low-level Base UI toast primitive namespace for custom composition. |
| | — | Render, refs, and events forwarded to the toast root. |
| | false | Compact anchored feedback with title text only. |
| | — | Compose a custom toast with native parts. |
| | — | Access the nearest provider for custom composition. |