Alert
Alerts can be used to highlight information to the user. Through the use of the skin system, we can achieve any number of styles of alert. Below are examples using the success, attention and error skins.
Success Alert
This is a demonstration of a information type alert message. This additional text is to demonstrate how it wraps over multiple-lines
Attention Alert
This is a demonstration of a information type alert message. This additional text is to demonstrate how it wraps over multiple-lines. Interactive elements like hyperlinks maintain consistent styling.
Error Alert
Select your complimentary Pureology Hydrate Shampoo & Conditioner 50ml when you spend £45 on Professional Haircare brand.
General Alert Variables
| Variable | Default Value | Description |
|---|---|---|
--alert-padding | 0.5em | Padding around the content |
--alert-border-default | none | Allow a border, deafult none |
--alert-border-radius | var(--radius-site) | Border radius |
Alert Icon Variables
| Variable | Default Value | Description |
|---|---|---|
--alert-icon-padding-x | 0rem | Vertical padding around the content |
--alert-icon-padding-y | 0.25rem | Horizonal padding around the content |
--alert-icon-height | 24px | Default icon height |
--alert-icon-min-height | 24px | Prevent shrinking of icon |
--alert-icon-width | 24px | Default icon width |
--alert-icon-min-width | 24px | Prevent shrinking of icon |
Accessibility
In these examples, the svg icon has the aria-hidden attribute so that the icon is not visible to the Accessibility tree. This is appropriate as these icons are not interactive and are considered decorative, as the paragraph content contains the information needing to be relayed to the screenreader.