Alert

Thin accessibility wrapper with role="alert", variant colours, and custom colour support. Layout is composed freely via children.

Example

This is an informational message.

Success

Your changes have been saved.

Alert with custom colors via surface props.

Props

NameTypeDefaultRequiredDescription
variant'info' | 'success' | 'warning' | 'danger'NoAlert style variant
surfacestringNoCustom background colour (sets variant to custom)
onSurfacestringNoCustom text colour (sets variant to custom)
borderstringNoCustom border colour (sets variant to custom)

Accessibility

  • role="alert" for screen reader announcement

Related Tokens

--alert-info--alert-success--alert-warning--alert-danger