Tooltip - mirrors Fluxon's tooltip/1 API.
The tip is Zag-driven (a @zag-js/tooltip state machine, loaded on
demand): the hook root carries data-zag plus data-scope="tooltip" /
data-part anatomy, and Zag owns open state, hover/focus timing, and
positioning. Styling stays lui-* tokens. Two modes:
- client (default) — Zag owns open state; hover/focus timing is the
machine's
openDelay(delayattr). - server-driven (
controlled) — the server value (open) is truth; opens flow out throughon_change, patches flow in.
Summary
Functions
Attributes
id(:string) - Stable DOM id for the tooltip hook; auto-generated when omitted, mirroring Fluxon's tooltip (drop-in parity). Defaults tonil.value(:string) - Plain-text tip when no :content slot is given. Defaults tonil.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 to200.arrow(:boolean) - Show the small pointer arrow toward the trigger. Defaults totrue.controlled(:boolean) - Server-driven open state:openis truth, patches flow into the machine. Defaults tofalse.open(:boolean) - Open state forcontrolledmode (client mode ignores it). Defaults tonil.on_change(:string) - Server event pushed on open change (lantern:tooltip:set-openreplies). Defaults tonil.on_change_client(:string) - Bubbling DOM CustomEvent dispatched on open change. Defaults tonil.class(:any) - Extra classes merged onto the root element. Defaults tonil.- Global attributes are accepted. Arbitrary HTML/
phx-*attributes passed through.
Slots
inner_block(required) - Trigger element that shows the tip.content- Rich tip body; overridesvaluewhen present.