Inline alerts.
Summary
Functions
Renders an alert. Uses role="alert" for danger/warning (assertive) and
role="status" otherwise (polite), so live announcements match urgency.
Functions
Renders an alert. Uses role="alert" for danger/warning (assertive) and
role="status" otherwise (polite), so live announcements match urgency.
<.alert color="success" title="Saved">Your changes are live.</.alert>
<.alert color="danger" on_close={JS.hide(to: "#err")} id="err">Something broke.</.alert>Attributes
id(:string) - Defaults tonil.color(:string) - Defaults to"neutral". Must be one of"neutral","accent","success","warning","danger", or"info".title(:string) - Defaults tonil.icon(:boolean) - Defaults totrue.on_close(Phoenix.LiveView.JS) - when given, renders a close button. Defaults tonil.class(:any) - Defaults tonil.- Global attributes are accepted.
Slots
inner_block(required)