Summary
Functions
Attributes
color(:string) - Defaults to"info". Must be one of"info","success","warning","danger", or"gray".variant(:string) - The variant of the alert. light/soft/dark/outline are the tinted-surface school; callout is the toast-cohesive form - neutral panel surface, a coloured left accent bar, and a solid kind icon (colour as accent, not as surface). Defaults to"light". Must be one of"light","soft","dark","outline", or"callout".with_icon(:boolean) - adds some icon base classes. Defaults tofalse.class(:any) - CSS class for parent div. Defaults tonil.heading(:string) - label your heading. Defaults tonil.label(:string) - label your alert. Defaults tonil.icon(:string) - a Heroicon name to use instead of the kind icon (e.g. "hero-lock-closed" for a security notice); implies with_icon. Defaults tonil.close_button_properties(:list) - a list of properties passed to the close button. Defaults tonil.on_dismiss(Phoenix.LiveView.JS) - JS commands to run when the alert is dismissed. Any non-empty command (e.g. JS.dispatch("my-app:alert-dismissed")) adds a close button with built-in hide behaviour; the empty default and nil render no button - so conditionally passing nil is safe. Defaults to%Phoenix.LiveView.JS{ops: []}.- Global attributes are accepted.
Slots
inner_blockactions- buttons or links rendered under the message, indented with the text column.