Design System
Feedback

Alert

An inline, persistent message. Pair a title with a short description; the variant carries the tone.

Purpose

An alert stays until the situation changes, which is what separates it from a Toast. Put it next to the thing it is about.

Tones

Five variants; the tone carries severity, the glyph and text carry meaning.

Icon

Each variant brings its own status glyph — info, check_circle, warning, error — via withIcon, which defaults to true. Pass withIcon={false} for a text-only alert, but only where the title already carries the severity.

Structure

PropertyValue
Padding16px (p-4)
Layoutflex row, 12px gap (gap-3)
Radius--radius-lg (8px)
Border1px tone colour at 20–40% opacity (--border for neutral)
Filltone subtle background with tone ink (bg-info-subtle / text-info-text …)
Icon20px tone glyph, nudged 2px down to align with the title
Title<h5>, semibold, tight leading
Description14px (text-sm), relaxed leading

Best practices

Do

  • Place the alert next to the thing it describes — a form, a record, a section.
  • Pick the tone by severity, not decoration: destructive means something failed or is at risk.
  • Keep the title to one line and the description to a sentence or two.
  • Override role to "status" for polite confirmations injected after load (see below).

Don't

  • Use an alert for transient confirmations — that is a Toast's job.
  • Stack several alerts in one place; merge them or fix the worst problem first.
  • Remove the icon and rely on colour alone to signal severity.
  • Put the primary action of the page inside an alert — link out to where the fix happens.

Accessibility & keyboard

The component renders role="alert" by default — an assertive live region. Because your props spread after the default, you can override it, and the right role depends on when the alert appears:

  • Injected after load, demands attention — keep the default role="alert": screen readers interrupt to announce it. Right for failures and anything blocking the user.
  • Injected after load, polite confirmation — pass role="status": announced at the next pause instead of interrupting. Right for success and info messages.
  • Present at page load — no live region fires: announcements only happen when content is inserted into an existing region, so static alerts are simply read in document order. Nothing extra needed.

Also:

  • AlertTitle renders an <h5> — keep it short; it is what scanning users and heading navigation land on.
  • Severity is never colour-only: each tone pairs a glyph and written text.
  • Keyboard: an alert is not focusable and receives no focus when it appears — any link inside it sits in the normal Tab order.

Props

PropTypeDefaultDescription
withIconboolean | undefinedtrueShow the leading status glyph.
variant"info" | "success" | "warning" | "destructive" | "neutral" | null | undefined——

On this page