Alert
A callout that draws attention to an important message.
- Feedback
- 1 file
- 1 npm package
- Accessibility notes
Loading the example…
pnpm dlx @dowel-ui/cli add alertnpm packages installed: class-variance-authority.
import { Alert } from "@/components/ui/alert";Default
Variants
Without Icon
Title Only
Live Region
<Alert>
| Prop | Type | Default |
|---|---|---|
live | AlertLive | "off" |
variant | "default" | "destructive" | "success" | "warning" | "info" | "default" |
Plus every attribute of <div>.
<AlertTitle>
Plus every attribute of <div>.
<AlertDescription>
Plus every attribute of <div>.
Not a live region by default. Pass live="polite" for alerts that appear in response to a user action, or live="assertive" for errors that must interrupt. Variant colour is never the only signal — the title carries the meaning.
7/7
checks passed
- Tested — passes
- axe assertion — passes
- Keyboard tested — does not apply
- Storybook examples — passes
- Accessibility documented — passes
- Semantic tokens only — passes
- Motion from tokens — does not apply
- className merged — passes
- Visible focus — does not apply
- No fixed widths — passes