MenuChevron Down
Alert Alerte - Docs - Artefact

Alert Alerte

Feedback
Tier 3

Introduction

Affiche un message bref et important de manière à attirer l'attention de l'utilisateur sans interrompre ses tâches.

Utilisation

import { Alert, AlertIcon } from "../components/ui";

export default function MyPage() {
  return (
    <Alert
      status="success"
      title="Success"
      description="Your changes have been saved."
      indicator={<AlertIcon />}
    />
  );
}

Constructeur de pages CMS

Ce composant est disponible sous forme de bloc alert dans Page Builder (content/pages/*.json) :

{
  "type": "alert",
  "status": "success",
  "title": "Success",
  "description": "Your changes have been saved.",
  "variant": "subtle"
}

Propriétés

PropriétéTypeDescription
titlestringLe titre de l'alerte.
descriptionstringLa description de l'alerte.
indicatorChildUne icône ou un élément à afficher comme indicateur.
childrenChildContenu supplémentaire à restituer à l'intérieur du composant.
classstringClasses CSS personnalisées.

| status | `"info" \ | "succès" \ | "warning" \ | "error" \ | "neutral"` | The status color palette of the alert. |

| variant | `"subtle" \ | "solide" \ | "outline"` | The visual style of the alert. | | aria-live | `"polite" \ | "assertif" \ | "off"` | The aria-live setting of the alert. Defaults to "polite". |