Animated Alert

Preview

Install

Add it with the shadcn CLI, or copy the source manually.

$ bunx --bun shadcn add @beui/alert

API Reference

Alert

variant?
"default" | "success" | "info" | "warning" | "destructive"
Defaultdefault
open?
boolean
Default—
defaultOpen?
boolean
Defaulttrue
onOpenChange?
((open: boolean) => void)
Default—
returnFocusRef?
RefObject<HTMLElement | null>

Focus this element when closing hides the currently focused alert control.

Default—
contentClassName?
string

Layout classes for the inner row, separate from the animated surface.

Default—
role?
"alert" | "status"

Defaults to alert for warning/destructive, and status for other variants.

Defaultvariant === "warning" || variant === "destructive" ? "alert" : "status"
labels?
Partial<{ dismiss: string; }>

Override any built-in string.

Default—
className?
string
Default—

AlertIcon

className?
string
Default—

AlertContent

className?
string
Default—

AlertTitle

className?
string
Default—

AlertDescription

className?
string
Default—

AlertAction

className?
string
Default—

AlertClose

className?
string
Default—
Also on React Native. Feedback that eases in and folds away.

Used in these Pro blocks

Updated