Animated Alert

Composable feedback with smooth transitions.

Preview

A little heads up
Your changes are saved automatically as you work.

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"
default
open?
boolean
—
defaultOpen?
boolean
true
onOpenChange?
((open: boolean) => void)
—
returnFocusRef?
RefObject<HTMLElement | null>

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

—
contentClassName?
string

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

—
role?
"alert" | "status"

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

variant === "warning" || variant === "destructive" ? "alert" : "status"
className?
string
—

AlertIcon

className?
string
—

AlertContent

className?
string
—

AlertTitle

className?
string
—

AlertDescription

className?
string
—

AlertAction

className?
string
—

AlertClose

className?
string
—

Updated