Skip to main content

Components

Alert

Alert provides users with information that is especially important for them to see and understand. The component is designed to capture users' attention. The text in the alert should be short and clear.

Usage

Examples

Changing the alert

In code, you change the type of alert by changing data-color. The icon is controlled via CSS.

HTML

For HTML, use the class name ds-alert and the attribute data-color to change the type of alert. Read above for when to use role and aria-live.

Read about role and aria-live on the accessibility page for the Alert component.

Edit this page on github.com (opens in a new tab)