Toast Stack
ProNewDepth-stacked notification cards that fan out smoothly on hover or keyboard focus with animated push and dismiss.
Installation
pnpm dlx shadcn@latest add @viewport/toast-stack
First time? Add the @viewport registry to components.json. Setup takes one minute.
Usage
The code behind the preview above comes with Truffle Pro.
Props
| Prop | Type | Default |
|---|---|---|
| items* | ToastItem[]Notification items, newest first. | — |
| onDismiss* | (id: string) => voidCalled when a toast is dismissed. | — |
| className | string | — |
Accessibility
- Expands on keyboard focus as well as hover, and collapses when focus leaves.
- Each toast has a labelled dismiss button naming the notification.
- Stack transitions respect prefers-reduced-motion.