Notification Stack
Use Notification Stack for a concise, top-right summary of asynchronous updates. New items materialize with a small amount of spatial context, while the stack quietly closes gaps as items are dismissed.
Preview
Deployment completed
Your production release is live.
New review requested
Maya asked for feedback on the interaction pass.
Storage is nearly full
Free space before your next backup.
Installation
Basic usage
Usage
API
| Property | Type | Default | Description |
|---|---|---|---|
notifications | NotificationStackItem[] | required | Notifications displayed from newest to oldest. |
onDismiss | (id: string) => void | — | Called when a notification's dismiss button is selected. |
placement | "top-right" | "inline" | "top-right" | Controls whether the stack is fixed to the viewport's top-right corner or placed by its parent. |
maxVisible | number | 4 | Caps the number of visible notifications. |
className | string | — | Additional CSS classes for the stack container. |
Accessibility
The stack uses a polite live region so new updates are announced without interrupting active work. Dismiss controls have explicit labels and remain keyboard accessible. Reduced motion replaces spatial movement with a short opacity transition.
Provide onDismiss and remove the matching item from your notification array to enable dismissal. Without a callback, dismiss buttons are omitted. Dismissal moves focus to a neighbouring dismiss button or the stack. Exiting content becomes inert immediately. Actions remain visible for touch users and are disabled when they have no onClick callback.
Styling
CLI installation registers the shadow utilities automatically. For manual installation, install shadow-plugin and add @plugin "shadow-plugin"; to your Tailwind v4 stylesheet.
The default placement is fixed at the top-right of the viewport. Use placement="inline" to keep the stack in normal document flow, with its width bounded by its parent.
Was this page helpful?
Your response helps us improve component docs.