Toast.Components (Toast v0.2.0)

View Source

Toast UI components for LiveToast.

Summary

Functions

Renders the toast container element.

Renders flash messages when not connected to LiveView. This provides a fallback for server-rendered pages.

Renders an individual toast notification.

Functions

container(assigns)

Renders the toast container element.

Attributes

  • id (:string) - Defaults to "toast-container".
  • class (:string) - Defaults to "".
  • position (:string) - Defaults to "bottom-right".

Slots

  • inner_block

flash_group(assigns)

Renders flash messages when not connected to LiveView. This provides a fallback for server-rendered pages.

Attributes

  • flash (:map) (required)
  • theme (:string) - Defaults to "light".
  • position (:string) - Defaults to "bottom-right".
  • rich_colors (:boolean) - Defaults to false.

toast(assigns)

Renders an individual toast notification.

Attributes