Skip to main content

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 bar
Live demo
Open ↗

When 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​

PropTypeRequiredDescription
tone"info" | "positive" | "notice" | "negative"—
titleReact.ReactNode—
iconReact.ReactNode—Override the default tone icon.
actionsReact.ReactNode—Buttons/links shown after the message (not inside its text); they wrap under it when narrow.
childrenReact.ReactNode—
classNamestring—