# Dropdown anatomy

URL: /chirp-ui/docs/components/dropdowns/
Section: components
Description: Rendered anatomy and Alpine contracts for dropdown menus, selects, and split menus

---

> For a complete page index, fetch /chirp-ui/llms.txt.

Chirp UI ships three dropdown macros from `chirpui/dropdown_menu.html`:

- `dropdown_menu(trigger, items, id="chirpui-dropdown")`
- `dropdown_select(trigger_label, items, selected=none, id="chirpui-dropdown-select")`
- `dropdown_split(primary_label, primary_href=none, primary_action=none, items=[], icon=none)`

`dropdown_menu` and `dropdown_split` use the `chirpuiDropdown()` Alpine
controller. Item selection is dispatched through
`chirpui:dropdown-selected`, with payloads read from escaped `data-label`,
`data-href`, and `data-action` attributes.

`dropdown_select` uses `chirpuiDropdownSelect()` and emits
`chirpui:dropdown-selected` with `{ label, value }`.

The full rendered contract, ARIA roles, focus behavior, keyboard behavior,
HTMX link behavior, and proof locations live in the canonical source guide:
[`docs/DROPDOWN-ANATOMY.md`](https://github.com/lbliii/chirp-ui/blob/main/docs/DROPDOWN-ANATOMY.md?plain=1).
