Skip to main content Home About the Design SystemRoadmap OverviewDesignersDevelopers OverviewColorGridIconographyInteractionsSpacingTypography Overview Global colorBox shadowTypographyBorderOpacitySpaceLengthIconBreakpointsMedia queries All elements Accordion Alert Announcement Audio player Avatar Back to top Badge Blockquote Breadcrumb Button Card Chip Code block Call to action Dialog Disclosure Footer Health index Icon Jump links Menu dropdown Navigation link Navigation (primary) Navigation (secondary) Navigation (vertical) Pagination PopoverPlanned Progress stepper Scheme toggle Site status Skeleton Skip link Spinner Statistic Subnavigation Surface Switch Table Tabs Tag Tile Timestamp Tooltip Video embed OverviewColor PalettesCustomizingDevelopers All PatternsAccordionAlertCall to ActionCardFilterFormLink with iconLogo wallSearch barSticky bannerSticky cardTabsTagTile All Personalization PatternsAnnouncement FundamentalsAccessibility toolsAssistive technologiesCI/CDContentContributorsDesignDevelopmentManual testingResourcesScreen readers Design/code status Release notes Get support

Alert

OverviewStyleGuidelinesCodeAccessibilityDemos
General guidelinesStatus levelsWriting contentActionsLayoutResponsive designBest practicesGeneral guidelinesStatus levelsWriting contentActionsLayoutResponsive designBest practices

General guidelines

In general, use an alert to communicate essential information to a user in a prominent way.

When to use an inline alert

Use an inline alert to communicate a short message about a specific user action within a component or layout. An inline alert appears in a content area and disappears when a user closes it or navigates away from the page. For example, use an inline alert to inform a user their form was submitted with errors.

Toast alerts

For time-based updates and non-blocking confirmations, use a toast via the RhAlert.toast() API. When to use toasts, accessibility considerations, layout, stacking, responsive behavior, and the full API are documented on the Alert pattern page.

Status levels

The status levels for alerts are Neutral, Info, Success, Warning, Caution, and Error. Each level communicates a specific message or severity.

Helpful tip

Go to the Color page to learn more about using status levels.

Examples of the different colors indicating alert status

Dismissal

Depending on the message, an inline alert can be dismissible or not dismissible. The close button should not be included if it is critical that a user read or interact with the alert. Toast alerts are always dismissible; see the Alert pattern.

Alert element dismissal inline examples

Writing content

Inline and toast alerts have limited space (see the Alert pattern for toast-specific guidance). Therefore content should be short and concise. A user should be able to quickly scan the content and know what steps to take next.

Element Character count How to write
Title text 60
  • Short and descriptive
  • Try to communicate the primary message using only title text
  • Must communicate severity
  • Write fewer words if there is body text
  • Write more words if there is no body text
Body text 150
  • Write 1 - 2 concise sentences and include links if necessary
  • Be concise and explain how to resolve an issue
  • Optional if title text accurately communicates the message
Action text 20 per button
  • Write 1 - 3 short words
  • Clearly write an action that a user can take
  • No long words or phrases

Actions

Actions enable a user to perform a specific action in relation to the alert message. They are optional, and no more than two should be used in a single inline or toast alert. When using two actions, ensure that they follow the guidelines below:

Example of button action text

Layout

Inline

An inline alert appears at the top of a content area or close to an item needing attention. The width varies based on content and layout. They can expand to fill a container or related content area.

Example of an inline alert at the top of a layout Example of an inline alert inside a form

Toast layout, persistence, stacking, and responsive behavior are documented on the Alert pattern page.

Responsive design

Large screens

On large screens, inline alert height is determined by the amount of content included. Inline alert width is determined by the width of its container or related content area.

Example of inline alert spanning content column width

Small screens

On small screens, inline alerts span one column. Toast sizing and stacking on small screens are described on the Alert pattern page.

Best practices

Mixing use cases

Example of using correct variants

Use the correct alert variants for the correct use cases.

Example of using incorrect variants

Do not use an inline alert for toast alert use cases and vice versa. See the Alert pattern for toast guidance.

© 2026 Red Hat Deploys by Netlify