Skip to content
design system
Thème d’affichage, actuellement Auto

molecule · stable · site, app · since 2026-08

Alert

Purpose

A message of information, success, warning or failure. It exists for three reasons, two of which are accessibility traps a hand-written box almost always misses: the word before the colour, the right ARIA role, and a decided live.

When to use, when not

Use it for a message the page shows about an action or a state: a form error at the top of the form, a confirmation after a save, a warning before a destructive step. Do not use it for a transient toast, for content that is merely framed (that is Callout), or for a field’s own error (Field carries it).

Anatomy

  1. The tone’s drawing from the icon set, aria-hidden.
  2. The tone’s word, visible, or visually hidden before a free title.
  3. The message.
  4. A line around, in the tone’s ink, never a fill.

Props

Props of Alert
NameTypeDefaultWhat it does
tone?Tone'info'What the message is: the word, the drawing and the ink follow.
title?stringAn optional title. The tone's word stays in the accessible name in every case.
live?booleanfalse`true` when the message appears after load, in response to an action. False by default: a message already present has nothing to announce.
class?string''Layout classes only: margins, never appearance.
childrenSnippet

States

Four tones, with or without a title, live or not.

error

Light

Erreur

Le mot de passe ne correspond pas.
Dark

Erreur

Le mot de passe ne correspond pas.
320 px, light

Erreur

Le mot de passe ne correspond pas.
320 px, dark

Erreur

Le mot de passe ne correspond pas.
216 px, light

Erreur

Le mot de passe ne correspond pas.
Forced colours, captured
Alert, story error, as Chromium renders it with forced colours active

info

Light

Information

Le taux moyen d'un site porte une décimale.
Dark

Information

Le taux moyen d'un site porte une décimale.
320 px, light

Information

Le taux moyen d'un site porte une décimale.
320 px, dark

Information

Le taux moyen d'un site porte une décimale.
216 px, light

Information

Le taux moyen d'un site porte une décimale.
Forced colours, captured
Alert, story info, as Chromium renders it with forced colours active

liveError

Appeared after an action: role alert, read at once.

Light
Dark
320 px, light
320 px, dark
216 px, light
Forced colours, captured
Alert, story liveError, as Chromium renders it with forced colours active

liveSuccess

Appeared after an action: role status, read at the next pause.

Light

Fait

Paramètres enregistrés.
Dark

Fait

Paramètres enregistrés.
320 px, light

Fait

Paramètres enregistrés.
320 px, dark

Fait

Paramètres enregistrés.
216 px, light

Fait

Paramètres enregistrés.
Forced colours, captured
Alert, story liveSuccess, as Chromium renders it with forced colours active

success

Light

Fait

Les 106 critères sont à jour.
Dark

Fait

Les 106 critères sont à jour.
320 px, light

Fait

Les 106 critères sont à jour.
320 px, dark

Fait

Les 106 critères sont à jour.
216 px, light

Fait

Les 106 critères sont à jour.
Forced colours, captured
Alert, story success, as Chromium renders it with forced colours active

titled

The free title shows; the tone word stays in the accessible name.

Light

Fait :Audit enregistré

Les 106 critères sont à jour.
Dark

Fait :Audit enregistré

Les 106 critères sont à jour.
320 px, light

Fait :Audit enregistré

Les 106 critères sont à jour.
320 px, dark

Fait :Audit enregistré

Les 106 critères sont à jour.
216 px, light

Fait :Audit enregistré

Les 106 critères sont à jour.
Forced colours, captured
Alert, story titled, as Chromium renders it with forced colours active

warning

Light

Attention

Cette action supprime aussi les captures du critère.
Dark

Attention

Cette action supprime aussi les captures du critère.
320 px, light

Attention

Cette action supprime aussi les captures du critère.
320 px, dark

Attention

Cette action supprime aussi les captures du critère.
216 px, light

Attention

Cette action supprime aussi les captures du critère.
Forced colours, captured
Alert, story warning, as Chromium renders it with forced colours active

Accessibility contract

  • Role and name: no role when the message is present at load (it is read in the flow). With live, alert for an error and status for everything else. The tone’s word is always in the accessible name.
  • Keyboard, focus: none. A live message never moves the focus.
  • Live regions: a message that appears after an action is announced; a message present at load is not. That is what live decides, and it must be decided.

Content rules

French. The message says what happened and, for an error, what to do. The tone’s word is the standard’s (Erreur, Attention, Fait, Information); a title, when there is one, is specific.

Do and don’t

  • Do set live on a message that appears in response to an action.
  • Do not set live on a message rendered with the page: it would be announced twice.
  • Do not use the warning tone for a decoration; the tone is the meaning.

Examples

<Alert tone="error" live>Le mot de passe ne correspond pas.</Alert>
<Alert tone="success" title="Audit enregistré">Les 106 critères sont à jour.</Alert>

Surfaces

  • App: the auth pages, the settings, the admin lists, the audit page.
  • Site: the beta page and the gallery.

Related

Callout, Icon.

Decisions

  • 2026-08: alert only for the error tone; a success announced as an alert harasses.
  • 2026-09-24: props tone (info, success, warning, error) and title; the drawing comes from the icon set, and the warning tone takes the attention ink the tokens define for it, where it used to borrow the plain ink.

Criteria held by construction

  • 3.1, Dans chaque page web, l'information ne doit pas être donnée uniquement par la couleur. Cette règle est-elle respectée ?
    Every tone carries a readable word (Erreur, Attention, Fait, Information) and a drawing; a red box with no word says nothing to whoever does not see the hue.
  • 7.1, Chaque script est-il, si nécessaire, compatible avec les technologies d'assistance ?
    The ARIA role is chosen from the tone: alert interrupts, status waits for a pause, and a message present at load announces nothing.

Tokens it reads

  • Colour: --rl-attention, --rl-c, --rl-ink-soft, --rl-nc
  • Typography: --rl-weight-bold, --rl-text-sm
  • Spacing: --rl-space-1, --rl-space-3, --rl-space-4
  • Layout: --rl-radius, --rl-border

Seen in patterns