LanternUI.Components.Tooltip (LanternUI v0.8.2)

Copy Markdown View Source

Tooltip - mirrors Fluxon's tooltip/1 API with a small LiveView hook for hover/focus timing and viewport-aware placement.

Summary

Functions

tooltip(assigns)

Attributes

  • id (:string) - Stable DOM id for the tooltip hook; auto-generated when omitted, mirroring Fluxon's tooltip (drop-in parity). Defaults to nil.
  • value (:string) - Plain-text tip when no :content slot is given. Defaults to nil.
  • placement (:string) - Preferred side of the trigger; may flip for viewport fit. Defaults to "top". Must be one of "top", "bottom", "left", or "right".
  • delay (:integer) - Milliseconds before the tip appears on hover/focus. Defaults to 200.
  • arrow (:boolean) - Show the small pointer arrow toward the trigger. Defaults to true.
  • class (:any) - Extra classes merged onto the root element. Defaults to nil.
  • Global attributes are accepted. Arbitrary HTML/phx-* attributes passed through.

Slots

  • inner_block (required) - Trigger element that shows the tip.
  • content - Rich tip body; overrides value when present.