View Source PhoenixNotif (phoenix_notif v0.1.0)

A drop-in replacement for notification system in Phoenix.

Summary

Functions

Link to this function

connection_group(assigns)

View Source

See PhoenixNotif.System.connection_group/1.

Link to this function

notification_group(assigns)

View Source

Renders a notification group for DeadView and LiveView.

  • For DeadView, it only renders flashes.
  • For LiveView, it renders flashes and toasts.

Attributes

  • id (:string) - the DOM id of notification group. Defaults to "notification-group".
  • position (:atom) - the location for showing notifications. Defaults to :bottom_right.
  • flash (:map) (required) - the map of flash messages.
  • connected (:boolean) - Defaults to false.
Link to this function

put_toast(socket, kind, message, options \\ [])

View Source

See PhoenixNotif.LiveComponent.put_toast/4.

Link to this function

send_toast(kind, message, options \\ [])

View Source

See PhoenixNotif.LiveComponent.send_toast/3.