Rebar UI

1.0

synthetic

Alert

An inline message with a status.

Project alertsInfo, success, warning, error
Harbour launch moved
Now Friday 24 Oct, 09:00.
Rota exported
14 shifts sent to Leo Santos.
Title only
Saved
With action
Long text

In context

Rota exportA warning above the actions it changes
Rota export

Props

PropTypeRequiredDefault
type"info" | "success" | "warning" | "error" | undefinedNoinfo
titleReactNodeNo—
iconReactNodeNo—
onClose(() => void) | undefinedNo—
bionicboolean | undefinedNo—
bionicOptionsBionicOptions | undefinedNo—

Accessibility

error and warning render role="alert" (announced at once); info and success render role="status" (announced politely). The tone is never the only signal: say it in the title.

data-rebar-* attributes

data-rebar-component="alert" with data-rebar-type set to the current type; data-rebar-part="title", "description".

Migrating to Ant Design

AntD's Alert takes the same type values with a message/description split (here title/children): a close, low-risk rename.