Search documentation

Find a component or a docs page

Alert

Displays a callout for user attention.

Usage

Example

An icon placed first gets its own column next to the title and description.

Without icon

Destructive

Custom colors

Alert ships the default and destructive variants. For any other color, pass class: with a light and a dark shade of the same scale, so the text stays readable in both themes.

With action

AlertAction pins a control to the top-right corner.

Static callout

Alert has role="alert": screen readers announce it right away, interrupting the user. Pass role: "status" to announce it without interrupting, or role: nil for a message that is part of the page.

Title as a heading

AlertTitle is a plain div. To list the alert in the page's headings, put a heading of the right level inside it.

Installation

Components

ComponentBuilt usingSource
AlertPhlex
AlertActionPhlex
AlertDescriptionPhlex
AlertDocsPhlex
AlertTitlePhlex