A dropdown menu built on client-side JS commands, Floating UI, and a small LiveView hook.
Like the dialog, this is a portal-free, fully client-driven menu. The trigger
toggles the menu content with toggle_menu/1 (a Phoenix.LiveView.JS builder
with enter/leave transitions); the ShadixDropdownMenu hook
(assets/ts/dropdown_menu.ts) watches the content's visibility via a
MutationObserver, positions it under the trigger with @floating-ui/dom
(computePosition + autoUpdate, bottom-start/flip/shift), manages
keyboard navigation (arrows/Home/End/Enter/Escape/Tab), and closes on outside
pointerdown via the data-on-close JS (hide_menu/1).
Trigger and content ids are derived from the required :id so aria-controls,
data-trigger, and the JS targets line up stably.
Summary
Functions
Renders a dropdown menu with a :trigger slot and arbitrary menu items.
A selectable menu item.
A non-interactive group label within a dropdown menu.
A horizontal separator between dropdown menu sections.
A trailing keyboard-shortcut hint within a dropdown menu item.
Returns the Phoenix.LiveView.JS command that closes the menu with id.
Returns the Phoenix.LiveView.JS command that toggles the menu with id.