Flash

Renders flash notices.

Read more Read less

Examples

<.flash kind={:info} flash={@flash} />
<.flash kind={:info} phx-mounted={show("#flash")}>Welcome Back!</.flash>

This flash will disappear in 5 seconds.

This flash will disappear in 3 minutes.

You've added a new supplier to the system.

Attribute Type Documentation Default Value
id :string

the unique id of the flash container

flash :map

the map of flash messages to display

%{}
show_close_button :boolean true
kind :atom

used for styling and flash lookup

icon :string
rest :global

the arbitrary HTML attributes to add to the flash container

timeout :integer 5000
link_text :string

text for an optional inline call-to-action link

link_href :string

href for the optional call-to-action link

link_click :any

a phx-click event (or JS command) for the call-to-action link, in place of an href

inner_block :slot

the optional inner block that renders the flash message