Primitives
Toaster
Notifications that stack, expand on hover and dismiss with a swipe.
Preview
Setup
One <Toaster /> anywhere in the tree. toast() is callable from a click handler, a fetch wrapper or a plain module.
app/layout.tsx
Variants
Success, info, warn and error have shorthands. Each is marked with an icon.
Stacking
New toasts pile up to the height of one. Hover to fan the pile out. Timers hold while it is open, so nothing expires under your cursor. Drag one sideways to dismiss it.
Actions
One action per toast. Give it a longer duration than the default. Pass duration: null for one that waits to be dismissed.
Promises
One toast for the whole operation. It waits, then becomes the result.
Position
Bottom centre by default. The top placements anchor by their top edge and grow downwards, away from the screen edge.
Source
The component and the queue share one file.
Files
Last updated: 12 August 2026