Alert
Style
An alert contains title text with an icon, body text, and a close button. They may also include action buttons below the text or inline links. There are two variants, toast and inline, which serve different purposes.
Anatomy
- Severity indicator
- Severity icon
- Title
- Body
- Actions
- Close button
Variants
Inline
The required elements of an Inline alert are a thin top bar or thin border, icon, title, close button, and a container background. Supporting text and buttons may or may not be included below the title to add clarity or optional actions.
Inline, alternate
The alternate Inline alert style includes a border instead of a line which can be used to express more urgency or better grab the attention of a user.
Toast
The required elements of a Toast alert are a thin top bar, icon, title, close button, and a white container with a subtle drop shadow. Supporting text and buttons may or may not be included below the title to add clarity or optional actions.
Interaction states
Interaction states are visual representations used to communicate the status of a component or element. The close button and any linked content are the only interactive elements in both alert variants.
Hover
Focus
Active
Spacing
Inline
Toast
Example | Token | Description |
---|---|---|
8 | --rh-space-md | 8px spacer |
16 | --rh-space-lg | 16px spacer |
24 | --rh-space-xl | 24px spacer |
Toast (stacked)
Other libraries
To learn more about our other libraries, visit this page.
Feedback
To give feedback about anything on this page, contact us.