Alert
Feedback
Presentational
Introduction
Displays a brief, important message in a way that attracts the user's attention without interrupting the user's tasks.
Usage
Success
Your changes have been saved.
import { Alert, AlertIcon } from "../components/ui";
export default function MyPage() {
return (
<Alert
status="success"
title="Success"
description="Your changes have been saved."
indicator={<AlertIcon />}
/>
);
}
CMS Page Builder
This component is available as an alert block in the Page Builder (content/pages/*.json):
{
"type": "alert",
"status": "success",
"title": "Success",
"description": "Your changes have been saved.",
"variant": "subtle"
}
Props
| Prop | Type | Description |
|---|---|---|
title | string | The title of the alert. |
description | string | The description of the alert. |
indicator | Child | An icon or element to be rendered as an indicator. |
children | Child | Additional content to be rendered inside the component. |
class | string | Custom CSS classes. |
| status | `"info" \ | "success" \ | "warning" \ | "error" \ | "neutral"` | The status color palette of the alert. |
| variant | `"subtle" \ | "solid" \ | "outline"` | The visual style of the alert. |
| aria-live | `"polite" \ | "assertive" \ | "off"` | The aria-live setting of the alert. Defaults to "polite". |