Alert
An inline contextual message with a tone icon and ARIA live region.
Signature
Density
Viewport
Theme and light/dark are set in the top barWhen to use
- Use it when An inline, persistent message about the state of the page or a section.
- Reach for something else when Transient confirmations — use a toast via
ToastProvider.
Accessibility
Status messages use role="status" / aria-live="polite" (or assertive for errors) so updates are announced without stealing focus.
Install and import
npx shadcn@latest add @prism/alert
import { Alert } from '@/components/prism/Alert';
In a no-build prototype, read it from the bundle instead: const { Alert } = window.PrismDesignSystem_39d121;
Props
| Prop | Type | Required | Description |
|---|---|---|---|
tone | "info" | "positive" | "notice" | "negative" | — | |
title | React.ReactNode | — | |
icon | React.ReactNode | — | Override the default tone icon. |
actions | React.ReactNode | — | Buttons/links shown after the message (not inside its text); they wrap under it when narrow. |
children | React.ReactNode | — | |
className | string | — |