Skip to main content Red Hat Design System logo Contribute on Github

Alert

Overview Style Guidelines Code Accessibility

Overview

An alert is a banner used to notify a user about a change in status or communicate other information. It can be generated with or without a user triggering an action first.

Status

What do these mean?
Figma library:
Ready
Responsive:
Ready
RH Elements:
Ready
webRH:
Ready

Sample element

Two examples of the alert element

Demos

View a live version of this component and see how it can be customized.

<rh-alert>
<h3 slot="header">Default</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam eleifend elit sed est
egestas, a sollicitudin mauris tincidunt.</p>
<rh-button slot="actions" variant="link" data-action="dismiss">Dismiss</rh-button>
<rh-button slot="actions" variant="link" data-action="confirm">Confirm</rh-button>
</rh-alert>

<script type="module">
import '@rhds/elements/rh-alert/rh-alert.js';
import '@rhds/elements/rh-button/rh-button.js';
</script>
Full screen demo

When to use

  • When additional information needs to be emphasized
  • When a user needs to be notified after performing an action
  • When the severity of a message needs to be indicated
Property Status Meaning
Figma library Ready Component is available in the Figma library
Responsive Ready Component responds to changing viewport sizes in Figma and the browser
RH Elements Ready Component is available as a web component
webRH Ready Component is available as a web component
© 2021-2024 Red Hat, Inc. Deploys by Netlify