
Premium solid notification toasts with actions, stacking, and swipe dismissal.
npx shadcn@latest add https://ui.edbn.me/api/analytics/registry/toast.jsonProvides context for toast components. Wrap once near app root.
timeoutnumber5000Default auto-close time (ms)
limitnumber3Max visible toasts
A fixed area where toast notifications appear. Renders a div element.
classNamestring | functionCSS class name
renderReactElement | functionCustom render function
Groups all parts of a single toast. Renders a div element.
type'foreground' | 'background''foreground'Urgency type
prioritynumberSort order priority
classNamestring | functionCSS class name
renderReactElement | functionCustom render function
| Attribute | Description |
|---|---|
| data-open | Present when toast is visible |
| data-closed | Present when toast is closing |
| data-starting-style | Present when animating in |
| data-ending-style | Present when animating out |
| data-expanded | Present when toast list is expanded |
| data-stacked | Present when toast is stacked |
| data-limited | Present when toast exceeds limit |
| data-swipe-direction | Swipe direction |
| Variable | Description |
|---|---|
| --toast-index | Index in the visible toast list |
| --toast-count | Total number of visible toasts |
An accessible title for the toast. Renders a div element.
classNamestring | functionCSS class name
renderReactElement | functionCustom render function
A description for the toast. Renders a div element.
classNamestring | functionCSS class name
renderReactElement | functionCustom render function
A button that closes the toast. Renders a button element.
nativeButtonbooleantrueRender as native button
classNamestring | functionCSS class name
renderReactElement | functionCustom render function