Components / Feedback

Alert macrolite

An inline banner with an icon, a title and a message.

Built from
BoxIconText
Children
none
Loading the renderer…
Alert rendered by the React renderer on Web
Web React
Alert rendered by the SwiftUI renderer on iOS
iOS SwiftUI
Alert rendered by the Compose renderer on Android
Android Compose
Alert rendered by the gpui renderer on Desktop
Desktop gpui

View exponential-ui-alert, painted by each native renderer.

type · info
type · success
type · warning
type · error
PropTypeDefaultDescription
titlerequiredstring–The banner heading.
messagestring–The detail under the heading.
typeinfo | success | warning | error"info"The severity, which picks the icon and tone.

No events, no slots. Children: none.

Role
alert
Semantics
alert for warning/error, status otherwise. alert for warning/error, status otherwise ($a11y).

Not focusable; no keys.

Recipe parts
Alert/rootAlert/iconAlert/bodyAlert/titleAlert/message
Keyed by
type:hover:pressed:focus:disabled:checked:open:selected:invalid:dragover

Themes · Write a theme

Alert

The inline banner: a message that belongs to the page it interrupts, not a toast that flies past and not a dialog that blocks.

More

Two variants only — the neutral card fill for a notice, and the destructive tint for a failure — and the leading glyph earns its own column only when one is passed. The admin console carried two byte-identical copies of the destructive recipe before this existed.

Webok
Alert / AlertTitle / AlertDescriptionpackages/ui/src/alert.tsx
iOSn/a

no boxed banner: an error renders as a red Text line on DesignTokens.Semantic.red

Androidn/a

no boxed banner: EXP-1249 deleted the caller-less GlassNotice; an error renders as a red Text line

Desktopok
controls::feedback::alert / alert_titleapps/desktop/crates/exponential-ui-gpui/src/controls/feedback.rs

default and destructive on the glass tokens, a glyph column only when one is passed; the repository dialog banner is one