Skip to content

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

VariableDefault ValueDescription
--alert-padding0.5emPadding around the content
--alert-border-defaultnoneAllow a border, deafult none
--alert-border-radiusvar(--radius-site)Border radius

Alert Icon Variables

VariableDefault ValueDescription
--alert-icon-padding-x0remVertical padding around the content
--alert-icon-padding-y0.25remHorizonal padding around the content
--alert-icon-height24pxDefault icon height
--alert-icon-min-height24pxPrevent shrinking of icon
--alert-icon-width24pxDefault icon width
--alert-icon-min-width24pxPrevent 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.