status-message
Inline notification banners for important messages. Use for success confirmations, warnings, errors, and informational notices.
Attributes
| Attribute | Values | Default | Description |
|---|---|---|---|
data-variant |
info, success, warning, error, neutral |
info |
Alert type and color |
data-filled |
boolean | - | Use solid background color |
data-compact |
boolean | - | Reduce padding |
Variants
Alerts come in five semantic variants for different message types.
Information
This is an informational message with helpful details.
Success
Your changes have been saved successfully.
Warning
Please review your information before proceeding.
Error
There was a problem processing your request.
Note
This is a neutral message for general notices.
Code
With Icons
Add an icon-wc element with data-icon attribute for visual emphasis.
Information
This message includes an icon for visual clarity.
Success
Your changes have been saved successfully.
Warning
Please review your information before proceeding.
Error
There was a problem processing your request.
Code
Filled Style
Add data-filled for a solid background color.
Filled Info
A more prominent informational alert.
Filled Error
A critical error that needs attention.
Code
Simple Alerts
Alerts can be simple single-line messages without title.
Your session will expire in 5 minutes.
File uploaded successfully!
Code
With Dismiss Button
Add a dismiss button for closable alerts.
Dismissable Alert
Click the X to dismiss this alert.
Code
Accessibility
For important alerts that need to be announced to screen readers, add the appropriate ARIA role.
Related Elements
- layout-card - Card container
- layout-badge - Status indicators and labels
- toast-wc - Toast notifications