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

Reduce motion:Off
Tune:Off
Inspect
  1. Deployment completed

    Your production release is live.

  2. New review requested

    Maya asked for feedback on the interaction pass.

  3. Storage is nearly full

    Free space before your next backup.

Installation

Basic usage

TypeScript
notifications.tsx

Usage

API

PropertyTypeDefaultDescription
notificationsNotificationStackItem[]requiredNotifications 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.
maxVisiblenumber4Caps the number of visible notifications.
classNamestring—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.