Skip to content

Alert

A tinted message box with a colored bar on the start edge.

Add .alert to any block element. Give it role="alert" for urgent messages or role="status" for the rest, so screen readers announce it.

Your changes were saved as a draft.

Colors

A color class sets the bar, border, tint and text color.

A new version is available.
Payment received.

Headings and links inside an alert take its color.

Welcome to Iris CSS

Start with plain HTML, then read the docs when you need a variant.

Variables

VariableDefault
--i-alert-padding-blockcalc(var(--i-spacing) * 0.75)
--i-alert-padding-inlinevar(--i-spacing)
--i-alert-accent-widthColored bar on the start edge0.25rem