# Alert
Provide contextual feedback messages for typical user actions with the handful of available and flexible alert messages.
import {Alert} from 'src/components'
1
Global usage
Vue.component(Alert)
1
For local usage
export default {
components: {
Alert
}
}
1
2
3
4
5
2
3
4
5
# Sample alerts
Alerts are available for any length of text, as well as an optional dismiss button.
For proper styling, use one of the eight required contextual type props (e.g., type="success"
).
This is a primary alert—check it out!
This is a success alert—check it out!
This is a info alert—check it out!
This is a warning alert—check it out!
This is a danger alert—check it out!
# Link color
Use the .alert-link
utility class to quickly provide matching colored links within any alert.
This is a primary alert with an example link. Give it a click if you like.
This is a success alert with an example link. Give it a click if you like.
This is a info alert with an example link. Give it a click if you like.
This is a warning alert with an example link. Give it a click if you like.
This is a danger alert with an example link. Give it a click if you like.
# Dismissing
You can dismiss alerts, by providing a dismissible
prop. When clicking the X
icon, the alert will disappear.
Well done! You successfully read this important alert message.
# Slots
Name | Description |
---|---|
default | Default content for the alert |
dismiss-icon | Content to replace default dismiss icon |
← File Structure Badge →