hp-dropdown-menu
Click-triggered menu with role="menu" + slotted <hp-menu-item>
children. Arrow keys move focus between items; Home / End jump; Enter / Space activate;
Escape dismiss.
Install
bun add @hexpunk/core lit import "@hexpunk/core"; Properties
| Property | Attribute | Type | Default | Description |
|---|---|---|---|---|
side | side | FloatingSide | "bottom" | |
align | align | FloatingAlign | "start" | |
offset | offset | number | 6 | |
open | open | boolean | false |
Events
| Event | Type | Description |
|---|---|---|
hp-dropdown-open | CustomEvent | When the menu opens |
hp-dropdown-close | CustomEvent | When the menu closes |
hp-menu-select | Event | When a menuitem is activated. detail: { value, item } |
Slots
| Slot | Description |
|---|---|
(default) | Trigger element (first child) |
content | hp-menu-item children |
CSS Parts
| Part | Description |
|---|---|
menu | The floating menu container |
Accessibility
Trigger auto-stamps aria-haspopup="menu" + aria-expanded.
Menu exposes role="menu"; items role="menuitem". First non-
disabled item receives focus on open. Selection closes the menu and restores focus to
the trigger.
No per-component entries in CHANGELOG.md yet.