A button that opens a menu of actions or a choice (sort by deadline, by value, by risk). The menu opens
under the button; ↑ ↓ Home End move between items, Enter or Space chooses, Esc closes and returns to the
button, a click outside closes it (DevactionUI.Dropdown hook).
An item is a plain action (role="menuitem") or one of a group of choices (checked is not nil, then
role="menuitemradio" with a check mark). It sends event with choice, or goes to navigate. A
separator puts a rule above the item, and danger colors it as destructive.
Summary
Functions
Attributes
id(:string) (required)label(:string) (required) - the name of the menu, for assistive technology.align(:atom) - Defaults to:start. Must be one of:start, or:end.size(:atom) - the height of the button: 36 or 42px. Defaults to:md. Must be one of:sm, or:md.class(:any) - Defaults tonil.target(:any) - aphx-target(a@myself) when used inside a LiveComponent. Defaults tonil.- Global attributes are accepted.
Slots
trigger(required) - what the button shows.item(required) - Accepts attributes:event(:string)value(:string)navigate(:string)checked(:boolean) - set (true or false) for a choice; leave out for an action.danger(:boolean)separator(:boolean)shortcut(:string)
check_icon(required) - the check mark of the chosen item, drawn by the caller.