Menu
Floating list of action items — a context menu or dropdown menu. Presentational: it renders the items (with optional icon, disabled and danger states); the consumer positions the box and wires clicks via the data-menu-item attribute. Content stays data-driven through the items prop. 1.2.0 (28.10.202
Nutzt: ui.icon
Beispiele
Eigenschaften
| Prop | Typ | Default | Builder-Label |
|---|---|---|---|
| items * | array | — | Menu items |
| padding | string: standard | none | sm | md | lg | xl | "standard" | Innenabstand (standard = Baustein-Wert) |
| margin | string: standard | none | sm | md | lg | xl | "standard" | Aussenabstand |
| border | string: standard | none | hairline | strong | "standard" | Rahmen |
| radius | string: standard | none | control | surface | pill | "standard" | Ecken-Rundung |
| textColor | string | "" | Textfarbe (Token; leer = Standard) |
| backgroundColor | string | "" | Hintergrundfarbe (Token; leer = Standard) |
| shadow | string: standard | none | sm | md | lg | "standard" | Schatten |
| width | string: standard | full | "standard" | Breite |
| alignSelf | string: standard | start | center | end | "standard" | Ausrichtung im Elternteil |
| anchor | string | "" | Anker-ID (Sprungziel, z. B. fuer Nav-Links) |
* Pflicht-Prop
Genutzte Design-Tokens
LLM-Notizen
component.menu
Floating list of action items — a context menu or a dropdown menu. Data-driven
through the items prop, purely presentational.
When to use
- A right-click context menu on an element (duplicate · move · delete …).
- The panel that opens under a dropdown trigger.
- NOT a full navigation or a tab strip → use
component.navigation/component.icon-rail.
Props
items— array of{ label, value, icon?, hint?, group?, active?, disabled?, danger? }.labelis
shown; value is a stable key placed on data-menu-item; icon is an optional
ui.icon name; hint is a muted second line under the label; active marks the
current choice (aria-current); disabled greys the item out; danger tints it with
the status-danger colour (destructive action).
group(1.2.0, 28.10.2026, opt-in, nex, wingQ-Chat) — up to 60 characters, trimmed.
Consecutive items with the same group get ONE heading before the first of them:
<div class="invisible-menu__group" role="presentation"> in --text-xs, muted, uppercase
with --tracking-wide (the --menu-header-* roles of the shared menu material). An item
without group ends the run — the same group later gets a new heading; skipped items
(blank label) do not count. Without group the markup is byte-identical to 1.1.
wingQ-Chat uses it for the slash-command menu: one menu with headings instead of a
ui.heading + menu per group.
Interaction
The menu is presentational: it renders buttons with data-menu-item="<value>".
The consumer POSITIONS the box (the component sets no position — add
position:fixed + coordinates for a floating menu, or drop it inline) and wires
the click (ev.target.closest('[data-menu-item]').dataset.menuItem). Group headings
are not focusable and carry no data-menu-item. No client controller, no built-in
event — reusable for any menu logic.
Tokens
Shared menu material (_shared/menu-surface.css): surface, border, shadow and item
measures come from the --menu-* roles; items use --menu-item-hover on hover and
--menu-danger for danger; group headings use --menu-header-font-size/-weight/-color
plus --tracking-wide. No raw colours or pixels.