Dropdown menu on the shared overlay runtime (anchored placement, focus return, Escape/outside dismissal, arrow-key item navigation).
<.dropdown id="row-actions" placement="bottom-end">
<:toggle>
<.button size="icon" aria-label="Actions"><.icon name="ellipsis-horizontal" /></.button>
</:toggle>
<.dropdown_header>object.png</.dropdown_header>
<.dropdown_button phx-click="download">Download</.dropdown_button>
<.dropdown_link navigate="/preview">Preview</.dropdown_link>
<.dropdown_separator />
<.dropdown_button phx-click="delete" data-danger>Delete</.dropdown_button>
</.dropdown>The API mirrors Fluxon's dropdown family (dropdown, dropdown_header,
dropdown_separator, dropdown_link, dropdown_button, dropdown_custom).
dropdown_header/1 labels a section, dropdown_separator/1 divides sections,
and dropdown_custom/1 provides non-item content. Use dropdown_link/1 for
navigation and dropdown_button/1 for actions.
Hover-open and animation-tuning attrs are accepted for Fluxon compatibility;
open/close is click/keyboard-driven and the fade is token-driven.
Summary
Functions
Attributes
id(:string) - Stable DOM id for the dropdown hook; auto-generated when omitted, mirroring Fluxon's dropdown (drop-in parity). Defaults tonil.label(:string) - default toggle button text when no :toggle slot. Defaults tonil.class(:any) - classes for the menu panel. Defaults tonil.container_class(:any) - Extra classes on the dropdown root wrapper. Defaults tonil.toggle_class(:any) - Classes on the default toggle button. Defaults tonil.disabled(:boolean) - Render disabled and non-interactive. Defaults tofalse.placement(:string) - Where the menu anchors relative to the toggle. Defaults to"bottom-start". Must be one of"bottom-start","bottom-end","top-start", or"top-end".animation(:string) - accepted for Fluxon compat. Defaults tonil.animation_enter(:string) - accepted for Fluxon compat. Defaults tonil.animation_leave(:string) - accepted for Fluxon compat. Defaults tonil.open_on_hover(:boolean) - accepted for Fluxon compat; click/keyboard only. Defaults tofalse.hover_open_delay(:integer) - accepted for Fluxon compat. Defaults tonil.hover_close_delay(:integer) - accepted for Fluxon compat. Defaults tonil.- Global attributes are accepted. Arbitrary HTML/
phx-*attributes passed through.
Slots
toggle- Custom trigger; defaults to a button using label.inner_block(required) - Menu items (buttons, links, separators).
Attributes
class(:any) - Extra classes merged onto the root element. Defaults tonil.disabled(:boolean) - Render disabled and non-interactive. Defaults tofalse.- Global attributes are accepted. Arbitrary HTML/
phx-*attributes passed through.
Slots
inner_block(required) - Button menu item label.
Attributes
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) - Custom non-item content inside the menu.
Attributes
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) - Header label content.
Attributes
class(:any) - Extra classes merged onto the root element. Defaults tonil.disabled(:boolean) - Render disabled and non-interactive. Defaults tofalse.- Global attributes are accepted. Arbitrary HTML/
phx-*attributes passed through. Supports all globals plus:["navigate", "patch", "href", "method", "download", "target"].
Slots
inner_block(required) - Link menu item label.
Attributes
class(:any) - Extra classes merged onto the root element. Defaults tonil.- Global attributes are accepted. Arbitrary HTML/
phx-*attributes passed through.