Skip to content
↑↓ to navigate↵ to openesc to close

Menu

Animated Alert

Preview

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

Install

Add it with your package manager, or copy the source manually.

Run it in a project set up with shadcn-vue. The source is copied to components/beui and its dependencies are added to your package.json. Read the shadcn-vue guide

bunx --bun shadcn-vue@latest add @beui-vue/alert

Import the shared styles once in your application.

TSUsage
import Alert from '@/components/beui/primitives/Alert.vue'
import '@/components/beui/styles.css'

API Reference

Alert

variant?
"default" | "info" | "success" | "warning" | "destructive"
Defaultdefault
v-model:open?
boolean
Defaultundefined
defaultOpen?
boolean
Defaulttrue
returnFocusRef?
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.

Default—
labels?
Partial<AlertMessages>

Override any built-in string.

Default—
class?
string
Default—
@open-change?
(value: boolean) => void
Default—

AlertIcon

class?
string
Default—

AlertContent

class?
string
Default—

AlertTitle

class?
string
Default—

AlertDescription

class?
string
Default—

AlertAction

class?
string
Default—

AlertClose

class?
string
Default—
@click?
(event: MouseEvent) => void
Default—
Also on React Native. Feedback that eases in and folds away.(opens in a new tab)

Used in these Pro blocks

Updated