# Alert
[component-header:sl-alert]
Alerts are used to display important messages.
Alerts are designed to be shown dynamically, so you need to include the `open` attribute to display them.
```html preview
This is a standard alert. You can customize its content and even the icon.
```
## Examples
### Types
Set the `type` attribute to change the alert's type.
```html preview
This is super informative
You can tell by how pretty the alert is.
Your changes have been saved
You can safely exit the app now.
Your settings have been updated
Some settings will take affect the next time you log in.
This will end your session
You will be logged out until you log in again.
Delete this file?
This is permanent, which means forever!
```
### Closable
Add the `closable` attribute to show a close button that will hide the alert.
```html preview
You can close this alert any time!
```
### Without Icons
Icons are optional. Simply omit the `icon` slot if you don't want them.
```html preview
Nothing fancy here, just a simple alert.
```
[component-metadata:sl-alert]