Components
Alert
A notice, warning or failure beside what it is about: a tinted box, or a plain line in a form or card.
Your data will be deleted for good.
Import
import { Alert } from '@rinzai/zen';Examples
Plain
plain: just the icon and text, for a line inside a card or a form. Any icon, or none.
Currency
API reference
<Alert>
A message beside the content it's about: a notice, a warning, a failure. A tinted box by default, or with plain, just the icon and text in the tone's colour. With a title, the title takes the tone and the text under it is quieter. Bad news is announced at once (role="alert"), anything else politely (role="status"); pass role to change that, e.g. "note" for a message that doesn't change.
| Prop | Type | Default |
|---|---|---|
iconReplaces the tone's icon (info, check, warning); | ReactNode | — |
plainJust the icon and text, no box: for a line inside a form or a card. | boolean | false |
titleA first line in the tone's colour; the text under it is quieter. | ReactNode | — |
tone
| "default" | "negative" | "positive" | default |