MenuChevron Down
Alert - Docs - Artefact

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

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

PropTypeDescription
titlestringThe title of the alert.
descriptionstringThe description of the alert.
indicatorChildAn icon or element to be rendered as an indicator.
childrenChildAdditional content to be rendered inside the component.
classstringCustom 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". |