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
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
Both Alert variants use spacing tokens to define the amount of space between elements.
Inline
Toast
Toast (stacked in layout)
Spacer | Current value | Token name |
---|---|---|
0.5rem 8px |
--rh-space-md | |
1.0rem 16px |
--rh-space-lg | |
1.5rem 24px |
--rh-space-xl |
Feedback
To give feedback about anything on this page, contact us.
Foundations
To learn how to use our other components in your designs, visit the Elements section.
Red Hat legal and privacy links
- About Red Hat
- Jobs
- Events
- Locations
- Contact Red Hat
- Red Hat Blog
- Diversity, equity, and inclusion
- Cool Stuff Store
- Red Hat Summit