Alert
A persistent message that helps people recover or continue.
Stack short results at the edge until you reach for them.
npx shadcn@latest add @silicon-ui/toast-stacknpx shadcn@latest add @silicon-ui/toast-stackInstall the dependencies.
npm install lucide-react motionCopy these files into your project. Shared files are skipped if you already have them.
components/silicon-ui/toast-stack/toast-stack.tsxcomponents/silicon-ui/toast-stack/toast-stack.module.cssInstall the foundation once per app for the design and motion tokens: npx shadcn@latest add @silicon-ui/silicon-foundation
ToastStack| Prop | Type | Default |
|---|---|---|
labelAccessible name of the notification region. | string | "Notifications" |
position | "bottom-right" | "bottom-center" | "bottom-left" | "bottom-right" |
containedPins the stack inside the nearest positioned ancestor instead of the window, for panels and previews. | boolean | false |
visibleToastsHow many toasts show at once. Older ones wait behind and return as the front ones close. | number | 3 |
hotkeyAlt+T moves focus into the stack. | boolean | true |
className | string | — |
ToastStackProvider| Prop | Type | Default |
|---|---|---|
children* | ReactNode | — |
durationBase lifetime in milliseconds. Warnings and errors stay 1.6 times longer. | number | 5000 |
limitOldest toasts beyond this count are dropped from the queue. | number | 12 |