跳到主要内容

Alerts

Provide contextual feedback messages for typical user actions with the handful of available and flexible alert messages.

Examples

Alerts are available for any length of text, as well as an optional dismiss button. For proper styling, use one of the eight variants.

结果
Loading...
实时编辑器

For links, use the <Alert.Link> component to provide matching colored links within any alert.

结果
Loading...
实时编辑器

Additional content

Alerts can contain whatever content you like. Headers, paragraphs, dividers, go crazy.

结果
Loading...
实时编辑器

Dismissing

Add the dismissible prop to add a functioning dismiss button to the Alert.

结果
Loading...
实时编辑器

You can also control the visual state directly which is great if you want to build more complicated alerts.

结果
Loading...
实时编辑器

API

Alert

AlertHeading