LanternUI.Components.Dropdown (LanternUI v0.4.0)

Copy Markdown View Source

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). 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