Umbra UI

Alert

An inline message about the state of the page or a task.

Staticimport { Alert } from 'umbra-ui'

Props

PropTypeDefaultDescription
dismissLabel stringDismissAccessible label for the dismiss button.
icon ReactNode—Replaces the default icon; pass `null` to hide it.
onDismiss (() => void)—When provided, shows a dismiss button that calls this handler.
title ReactNode—Short heading.
tone "accent" | "neutral" | "danger" | "success" | "warning" | "info"infoColour intent. `danger` and `warning` are announced assertively (`role="alert"`), others politely.
variant "soft" | "outline"softVisual weight.

Usage notes

For transient confirmations use Toast instead.

Accessibility

  • danger and warning use role="alert" (announced immediately); other tones use role="status". Override role for alerts present on page load.
  • The icon is decorative; tone is also conveyed by your text.
  • The dismiss button has an accessible label (dismissLabel).

Import

import { Alert } from 'umbra-ui';
import 'umbra-ui/styles.css'; // once, at the root of your app