Theme: ← Übersicht Tokens

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

Components v1.2.0 Overlay AppDesktop component.menu

Nutzt: ui.icon

Beispiele

Node context menu
With a disabled item
Select-style menu (hint + active)
Grouped items (1.2.0: items[].group → one heading per run)

Eigenschaften

PropTypDefaultBuilder-Label
items *array—Menu items
paddingstring: standard | none | sm | md | lg | xl"standard"Innenabstand (standard = Baustein-Wert)
marginstring: standard | none | sm | md | lg | xl"standard"Aussenabstand
borderstring: standard | none | hairline | strong"standard"Rahmen
radiusstring: standard | none | control | surface | pill"standard"Ecken-Rundung
textColorstring""Textfarbe (Token; leer = Standard)
backgroundColorstring""Hintergrundfarbe (Token; leer = Standard)
shadowstring: standard | none | sm | md | lg"standard"Schatten
widthstring: standard | full"standard"Breite
alignSelfstring: standard | start | center | end"standard"Ausrichtung im Elternteil
anchorstring""Anker-ID (Sprungziel, z. B. fuer Nav-Links)

* Pflicht-Prop

Genutzte Design-Tokens

color.action.primarycolor.text.mutedcontainer.2xsduration.fasteasing.standardsize.1size.2text.2xstext.xstracking.wideweight.semibold

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? }. label is

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.