A card with an arrow next to its trigger (<.popover>), for more than a tooltip holds.
<.popover id="lesson">
<:trigger><.button variant="primary">Lessons</.button></:trigger>
<:title>Group Lesson</:title>
<p class="mt-2">Lorem ipsum dolor sit amet.</p>
</.popover>
<.popover id="john" trigger_on="hover" placement="top" width="192px">...</.popover>Opens and closes from the browser (LedgerUI.toggle("lesson")), from the server
(LedgerUI.close(socket, "lesson")) or from open; a click outside and Esc close it. The
LedgerUI.Float hook (priv/static/ledger_ui/hooks/float.js) places it (placement, fallbacks when there
is no room, offset), draws the arrow and runs on_open / on_close (an event name with payload
%{"id" => id} to target, or a %JS{}).
The panel is a role="dialog" named by its :title or by label. width is the card's width
(272px by default; nil leaves it to its content).
Summary
Functions
Attributes
id(:string) (required)open(:boolean) - Defaults tofalse.placement(:string) - Defaults to"right-start". Must be one of"bottom-start","bottom","bottom-end","top-start","top","top-end","left-start","left","left-end","right-start","right", or"right-end".fallbacks(:list) - Defaults to["bottom", "top"].offset(:integer) - Defaults to12.trigger_on(:string) - Defaults to"click". Must be one of"click", or"hover".arrow(:boolean) - Defaults totrue.on_open(:any) - Defaults tonil.on_close(:any) - Defaults tonil.target(:any) - Defaults tonil.label(:string) - Defaults tonil.class(:any) - Merged into the card. Defaults tonil.width(:string) - The card's width;nilfor its content's. Defaults to"272px".- Global attributes are accepted.
Slots
inner_blocktitletrigger(required)