Toast stack
Toasts that fan into a scaled pile at the bottom of the screen and settle on a shared spring.
API reference
Components
<Toast />
One stacked card. Hidden toasts stay mounted, aria-hidden, and pointer-inert.
children?
Toast face. Toast only moves it.
className?
Extra classes on the animated card.
<ToastStack />
Fixed stack viewport. Gaps are pointer-inert; each visible toast re-enables clicks.
children?
Toast children, newest first.
maxVisible?
Visible count before the rest hide. Default 4.
stackOffsetY?
Vertical offset per step, in px. Default 10.
stackScale?
Scale shed per step. Default 0.06.
stackOpacity?
Opacity shed per step. Default 0.2.
className?
Extra classes on the fixed viewport.
Hooks
useToastStack
Headless toast queue. Newest toasts are prepended.
useToastStack(): UseToastStackResultReturns
toasts
Toast ids, newest first.
add
Push a toast onto the front of the queue.
dismiss
Remove the toast with this id.
useToast
Whether the enclosing toast is in the visible window. Hidden toasts should drop interactive controls from the tab order.
useToast(): ToastVisibilityFeatured in
See the toast stack composed into full sections.


