Alert

Static inline banner — no open/close motion, no portal. Carries a title, description, and optional leading icon or trailing action. Quiet by default, destructive when it matters.

Usage

Destructive

With action

Success

Confirms a positive outcome. Mirrors Badge's status palette so they read as siblings in alert lists.

Warning

Use for soft-fail conditions or upcoming actions that aren't yet errors.

Info

Neutral context — release notes, tips, or quiet announcements.

Alert.Root props

Inherits native HTMLDivElement attributes via spread. Renders role='alert' on the root.

PropTypeDescription
'default' | 'destructive' | 'success' | 'warning' | 'info'Tone. Destructive uses the destructive token; success/warning/info mirror Badge status colors with /10 (light) / /15 (dark) tinted backgrounds.
stringMerged onto the root via tailwind-merge.
HTMLDivElement | nullTwo-way-bindable element reference.