Alerts
Alerts are used to capture the attention of the user in an intrusive way.
install | yarn add @clayui/alert |
---|---|
version | 3.111.0 |
Stable3.111.0View in LexiconCHANGELOG
Display Types
The available displayTypes
are info
, secondary
, success
, warning
, and danger
.
Copied!
We recommend that you review the use cases in the Storybook.
Variants
You can use alert with the feedback
, inline
, and stripe
variants.
Copied!
Icons
Each Alert displayType
has a default icon, the icon can be changed through the symbol
attribute.
Copied!
Code Sample (expand to see it)
Using with ClayButton
Copied!
Code Sample (expand to see it)
Inline
Copied!
Code Sample (expand to see it)
Using with ToastContainer
You can use alerts with a ToastContainer
to render the alerts in a container with position: fixed
.
Copied!
Code Sample (expand to see it)