Click-toggled menu. The trigger is slotted and items are set via the items property. Selecting emits a menu-action event; outside-click and Esc close it.
Stablewcimport '@esa/ecology/esa-dropdown-menu';
Preview
Items are set in a script: el.items = [{ label: "Edit", action: "edit" }, …].
'trigger' matches the panel min-width to the trigger.
open
boolean
false
Reflected open state.
Methods
Prop
Type
Default
Description
close()
method
—
Closes the menu programmatically.
Events
Event
Type
Default
Description
menu-action
CustomEvent<string>
—
Fired when a non-disabled item with an action is selected; detail is the item's action string.
Accessibility
The panel is role="menu" and each item is role="menuitem"; dividers are role="separator".
Disabled items set the native disabled attribute and are skipped on activation.
Escape and any outside click close the menu.
Theming surface
Every public token this component reads, extracted from its source at build time.
The Resolves to column walks each token's real lineage —
component → semantic → primitive → raw value — so you
can see exactly where re-pointing it lands. A spoke re-skins by overriding these in
its theme-<slug>.css; component internals are never edited. No
hook for what you need? File it with /request-lego.