View Source ZoonkWeb.Components.Flash (Zoonk v0.1.0-alpha)

Flash components.

Link to this section Summary

Functions

Renders flash notices.

Shows the flash group with standard titles and content.

Link to this section Functions

Renders flash notices.

examples

Examples

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

attributes

Attributes

  • id (:string) - the optional id of flash container. Defaults to "flash".
  • flash (:map) - the map of flash messages to display. Defaults to %{}.
  • title (:string) - Defaults to nil.
  • kind (:atom) - used for styling and flash lookup.Must be one of :info, or :error. Global attributes are accepted.

slots

Slots

  • inner_block - the optional inner block that renders the flash message.

Shows the flash group with standard titles and content.

examples

Examples

<.flash_group flash={@flash} />

attributes

Attributes

  • flash (:map) (required) - the map of flash messages.