Alert
Molecule
Inline notification banners: info, success, warning, and destructive, plus a full-width announcement bar. For a blocking confirmation prompt, see Alert Dialog.
Playground
Every control sets a real prop of AlertProps. The JSX below updates as you go.
Web
iOS
Android
JSX · AlertProps
Variants
8 examples from src/molecules/alert/alert.md, each rendered live from its own JSX.
Anatomy
1
Container
2
Icon
3
Title
4
Description
5
Dismiss
6
Actions
Dimmed parts appear only in some states or variants.
Props
17 props on AlertProps, grouped as they are declared in source. Required props are marked *.
Accessibility and keyboard
Keyboard
Not focusable. It has no interaction of its own and takes the semantics of what it wraps.
Semantics
Roles
alert
button
ARIA on web
aria-live
From the docs
Inline notification banners: info, success, warning, and destructive, plus a full-width announcement bar. For a blocking confirmation prompt, see Alert Dialog.
Platform skins
The playground's props on each platform: same tree, native shapes, type and touch sizes.
Usage
Pressing the trailing "×" (dismissible) hides the banner out of the box; onDismiss reports it, and a controlled dismissed prop hands that state to the parent instead. Action buttons are real Buttons: wire each one's onPress.
A banner fills the parent it is given, so a column of alerts is the same measure top to bottom and a banner over a form lines up with the fields; a Container step sets the measure when the layout calls for one.
A banner is a soft callout: the tone's wash under a 1px edge of the tone's color, the tone's own glyph in that color, a foreground title and a muted body, from statusColors (the helper Badge and every toned surface read). The neutral banner is the quiet muted surface with an info glyph in the muted ink. Pass icon to draw another glyph (an <Icon /> takes the tone's color and the banner's 18px size), or icon={null} to draw none.
Tokens
Read from the playground render. Values follow the scheme and the ion hue.
--fd
--ft
--ion-soft
--ion-tx
--tx2