View Source DaisyUIComponents.Alert (DaisyUIComponents v0.1.6)

Alert component

https://daisyui.com/components/alert

Summary

Functions

Attributes

  • id (:string) - the optional id of alert container. Defaults to nil.
  • class (:any) - Defaults to nil.
  • color (:string) - Must be one of "info", "success", "warning", or "error".
  • Global attributes are accepted.

Slots

  • inner_block

Renders flash notices.

Shows the flash group with standard titles and content.

Functions

Attributes

  • id (:string) - the optional id of alert container. Defaults to nil.
  • class (:any) - Defaults to nil.
  • color (:string) - Must be one of "info", "success", "warning", or "error".
  • Global attributes are accepted.

Slots

  • inner_block

Renders flash notices.

Examples

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

Attributes

  • id (:string) - the optional id of flash container.
  • 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.
  • class (:string) - Defaults to nil.
  • direction (:atom) - Defaults to :top_right.
  • Global attributes are accepted. the arbitrary HTML attributes to add to the flash container.

Slots

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

Shows the flash group with standard titles and content.

Examples

<.flash_group flash={@flash} />

Attributes

  • id (:string) - the optional id of flash container. Defaults to "flash-group".
  • flash (:map) (required) - the map of flash messages.
  • direction (:atom) - Defaults to :top_right.