---
title: Alert
desc: Alert informs users about important events.
source: https://raw.githubusercontent.com/saadeghi/daisyui/refs/heads/master/packages/daisyui/src/components/alert.css
layout: components
classnames:
component:
- class: alert
desc: Container element
style:
- class: alert-outline
desc: outline style
- class: alert-dash
desc: dash outline style
- class: alert-soft
desc: soft style
color:
- class: alert-info
desc: info color
- class: alert-success
desc: success color
- class: alert-warning
desc: warning color
- class: alert-error
desc: error color
direction:
- class: alert-vertical
desc: Vertical layout, good for mobile
- class: alert-horizontal
desc: Horizontal layout, good for desktop
---
### ~Alert
12 unread messages. Tap to see.
```html
12 unread messages. Tap to see.
```
### ~Info color
New software update available.
```html
New software update available.
```
### ~Success color
Your purchase has been confirmed!
```html
Your purchase has been confirmed!
```
### ~Warning color
Warning: Invalid email address!
```html
Warning: Invalid email address!
```
### ~Error color
Error! Task failed successfully.
```html
Error! Task failed successfully.
```
### ~Alert soft style
12 unread messages. Tap to see.
Your purchase has been confirmed!
Warning: Invalid email address!
Error! Task failed successfully.
```html
12 unread messages. Tap to see.
Your purchase has been confirmed!
Warning: Invalid email address!
Error! Task failed successfully.
```
### ~Alert outline style
12 unread messages. Tap to see.
Your purchase has been confirmed!
Warning: Invalid email address!
Error! Task failed successfully.
```html
12 unread messages. Tap to see.
Your purchase has been confirmed!
Warning: Invalid email address!
Error! Task failed successfully.
```
### ~Alert dash style
12 unread messages. Tap to see.
Your purchase has been confirmed!
Warning: Invalid email address!
Error! Task failed successfully.
```html
12 unread messages. Tap to see.
Your purchase has been confirmed!
Warning: Invalid email address!
Error! Task failed successfully.
```
### ~Alert with buttons + responsive
we use cookies for no reason.
```html
we use cookies for no reason.
```
### ~Alert with title and description
New message!
You have 1 unread message
```html
New message!
You have 1 unread message
```