Ready-to-Use Components Powered by Flowbite, ShadCN & Headless UI
Component Library
Browse and explore components
Alert
An Alert is a UI component used to display important messages or notifications to the user.
Default Alert
Primary - A simple primary alert
Secondary A simple Secondary alert
Success A simple Success alert
Info A simple Info alert
Warning A simple Warning alert
Error A simple Error alert
Dark A simple Dark alert
Sample Code
Show Code
Copy Code
Light Default Alert
Primary - A simple primary alert
Secondary A simple Secondary alert
Success A simple Success alert
Info A simple Info alert
Warning A simple Warning alert
Error A simple Error alert
Light A simple Light alert
Sample Code
Show Code
Copy Code
Alert With Icon
Primary - A simple primary alert
Secondary - A simple secondary alert
Success - A simple success alert
Info - A simple Info alert
Warning - A simple warning alert
Danger - A simple Danger alert
Dark - A simple Dark alert
Sample Code
Show Code
Copy Code
Light Alert With Icon
Primary - A simple Primary alert
Secondary - A simple Secondary alert
Success - A simple Success alert
Info - A simple Info alert
Warning - A simple Warning alert
Error - A simple Error alert
Light A simple Light alert
Sample Code
Show Code
Copy Code
Dismissible Alert
Primary - A simple Primary alert
Secondary - A simple Secondary alert
Success - A simple Success alert
Info - A simple Info alert
Warning - A simple Warning alert
Error - A simple Error alert
Dark - A simple Dark alert
Sample Code
Show Code
Copy Code
Light Dismissible Alert
Primary - A simple Primary alert
Secondary - A simple Secondary alert
Success - A simple Success alert
Info - A simple Info alert
Warning - A simple Warning alert
Error - A simple Error alert
Dark - A simple Dark alert
Sample Code
Show Code
Copy Code
Rounded Alert
Primary - A simple Primary alert
Secondary - A simple Secondary alert
Success - A simple Success alert
Info - A simple Info alert
Warning - A simple Warning alert
Error - A simple Error alert
Dark - A simple Dark alert
Sample Code
Show Code
Copy Code
Light Rounded Alert
Primary - A simple Primary alert
Secondary - A simple Secondary alert
Success - A simple Success alert
Info - A simple Info alert
Warning - A simple Warning alert
Error - A simple Error alert
Light - A simple Light alert
Sample Code
Show Code
Copy Code
Light Border Accent
Primary - A simple Primary alert
Secondary - A simple Secondary alert
Success - A simple Success alert
Info - A simple Info alert
Warning - A simple Warning alert
Error - A simple Error alert
Sample Code
Show Code
Copy Code
Additional Content
Info alert! Change a few things up and try submitting again.
More info about this info alert goes here. This example text is going to run a bit longer so that you can see how spacing within an alert works with this kind of content.
Sample Code
Show Code
Copy Code
All Options
Info alert! Change a few things up and try submitting again.
More info about this info alert goes here. This example text is going to run a bit longer so that you can see how spacing within an alert works with this kind of content.
Sample Code
Show Code
Copy Code
API ( Alert )
Prop | Description | Type | Default |
---|---|---|---|
color | Sets the color scheme of the alert box. | 'primary' | 'success' | 'warning' | 'green' | 'info' |
icon | Adds a custom icon to the alert box. | 'HiInformationCircle' | - |
onDismiss | Callback function triggered when the dismiss button is clicked. | onDismiss={() => alert('Alert dismissed!')} | - |
rounded | Applies rounded corners to the alert box. | boolean | false |
withBorderAccent | Adds a border accent to the alert box. | boolean | false |
additionalContent | Allows additional content to be added inside the alert box. | React.ReactNode | null |