Skip to content
Alea0.1

Feedback

Alert

A message in the page: info, success, warning or danger, with actions.

Ant Design: Alert

import { Alert } from '@alea/ui';

Examples

Tones

Info, success, warning and danger.

New in 0.1

Forty components with dark and light.

Variables created

11 colors in the Theme collection.

One mode on the Free plan

Dark goes into its own collection.

Couldn't load the font

Install Inter or pick another font.

Actions and dismiss

Buttons on the right, a close button, and live to announce it.

Lab Pro is out

Thirteen plugins, one license.

Props

Alert props

A message in the page: info, success, warning or danger.

PropTypeDefaultDescription
actionsReactNode-Buttons or links on the right (or below on small screens).
hideIconboolean-Hide the icon.
liveboolean-Announce it to screen readers when it appears (role alert for danger, status otherwise). Default false for alerts on page load.
onDismiss(() => void)-Shows a close button and calls this.
titleReactNode-The headline, in bold.
tone"danger" | "success" | "warning" | "accent" | "info" | "neutral"'info'info (default), success, warning, danger, accent or neutral.

Accessibility

  • Set live when it appears after something the person did, so it is announced.

Keyboard

KeyDoes
TabMoves to the actions and the close button
EnterRuns the focused action

Do and don't

Do

  • Say what happened and what to do.

Don't

  • Don't use danger for things that are not errors.
Tested with axe, keyboard and screen reader roles