Alert
A component for displaying important messages to users.
New Message
You've got a new message.
npx shadcn@latest add @roiui/alertnpx shadcn@latest add @roiui/alert-tailwindanatomy
Error
Your session has expired. Please log in again.
Warning
Something went wrong.
Success
Your account has been created successfully.
Info
New features are available! Check out the latest updates.
Component props
Prop
Type
Default
Name
variantDescription
The visual style variant of the alert
Type
"default" | "destructive" | "warning" | "success" | "info"Default
"default"Name
sizeDescription
The size of the alert
Type
"default" | "sm"Default
"default"Name
classNameDescription
Additional CSS classes to apply to the alert
Type
stringDefault
-
Name
childrenDescription
The content to display inside the alert
Type
ReactNodeDefault
-
Component props
Prop
Type
Default
Name
classNameDescription
Additional CSS classes to apply to the alert title
Type
stringDefault
-
Name
childrenDescription
The title content
Type
ReactNodeDefault
-
Component props
Prop
Type
Default
Name
classNameDescription
Additional CSS classes to apply to the alert description
Type
stringDefault
-
Name
childrenDescription
The description content
Type
ReactNodeDefault
-