RRigdesign system
Feedback

Alert

A status message inside the page, in four semantic variants.

Examples

Heads upReviews close on Friday.
SavedYour changes are live.
Storage almost fullYou have used 90% of your plan.

Anatomy

Alert anatomy
#PartDescriptionPresence
1IconDecorative, reinforces the typeRequired
2TitleShort, boldRequired
3MessageOne or two linesRequired
4ActionOptional link or buttonOptional
5DismissOptional close buttonOptional

Specifications

VariantsInfo · Success · Warning · Error
StylesFilled · Outlined

Interaction

Keyboard
KeyResult
TabReaches actions and the close button
EscNot used; the alert is part of the page
Pointer and touch
TriggerResponse
AppearFades in 200ms; focus is not moved

Accessibility

role · alert / status

1.4.1Use of Colour1.4.3Contrast (Minimum)4.1.3Status Messages
Requirements
RequirementHow Rig meets it
Rolesrole="alert" for errors that need attention now; role="status" for information, success and warnings
Not colour onlyIcon, title and text carry the type
ContrastText on tinted background at 4.5:1
FocusNever steal focus for a non-blocking message

Read the matching WAI pattern ↗

Usage

Do and don’t
DoDon’t
Say what happened and what to do nextDo not stack more than two alerts
Do not use alerts for confirmation of routine actions (use Toast)

Notes from the Figma file

  • Background overlays map automatically between light and dark.