DaisyUIComponents.Toast (DaisyUIComponents v0.9.6)

View Source

Toast component for displaying notifications positioned at the corners of the page.

https://daisyui.com/components/toast/

Basic Example:

<.toast>
  <.alert color="info">New message arrived.</.alert>
</.toast>

Positioned Example:

<.toast horizontal="start" vertical="top">
  <.alert color="success">Data saved successfully!</.alert>
</.toast>

Summary

Functions

Renders a toast container for positioning notifications.

Functions

toast(assigns)

Renders a toast container for positioning notifications.

Examples

<.toast>
  <.alert>Default notification</.alert>
</.toast>

<.toast horizontal="center" vertical="top">
  <.alert color="info">Centered top notification</.alert>
</.toast>

Attributes

  • class (:any) - Defaults to nil.
  • horizontal (:string) - Horizontal alignment. Must be one of "start", "center", or "end".
  • vertical (:string) - Vertical alignment. Must be one of "top", "middle", or "bottom".
  • Global attributes are accepted.

Slots

  • inner_block