ns-ui / toast-gravity-stack
feed · awaiting events…
errors thud in heavy and sink; hover pauses a toast's timer; swipe right or hit x to dismiss — the sediment above resettles
ns-ui
Toast stack with real gravity — notifications thud into a jostling heap, errors sink under their own mass, and the pile resettles when one is dismissed.
Use when notifications that should pile rather than queue, thudding into a heap where severity reads as mass and the pile resettles when one is dismissed; pick toast-newton-cradle instead when the stack has a hard cap and each eviction must read as caused by the arrival that displaced it, or toast-undo-fuse when there is one notification with an undo window and the timer is the point.
Install
npx shadcn add https://design.helpmarq.com /r/toast-gravity-stack.jsonns-ui / toast-gravity-stack
feed · awaiting events…
errors thud in heavy and sink; hover pauses a toast's timer; swipe right or hit x to dismiss — the sediment above resettles
| Prop | Type | Default | Description |
|---|---|---|---|
| duration? | number | 6000 | ms before a toast auto-dismisses (paused on hover); 0 disables |
| gravity? | number | 1800 | px/s^2 downward |
| restitution? | number | 0.15 | bounce energy kept on impact, 0..1 |
| initial? | SedimentToastInput[] | — | toasts present at mount |
| className? | string | "h-96" | — |
| aria-label? | string | "Notifications" | — |