Alert

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

Example

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