ZAO造

Menu

A short list of actions attached to a trigger.

Anatomy

Measured parts, with contact expanded 18×. The native reference stays in place.

Measuring component parts…

Preview

Su uses the Quiet instrument direction. Use the mode switcher above to see light and dark.

Choose an action to see its result.

Shortcuts

A shortcut is a label. The host binds the key and runs the same action.

Usage

  • Use a menu for related actions that would crowd the page when shown together.
  • Use clear verbs for actions. Do not hide the main action in a menu.
  • A fill highlights the hovered or navigated action. Keyboard focus adds a visible outline.

API

PropValuesDefault
triggerstringrequired
itemsMenuAction[]required
disabledbooleanfalse
sizesmall | default | largedefault

Example

import { Menu } from '@zao/react';

<Menu trigger="Workspace actions" items={[{ label: 'Rename', onSelect: rename }]} />

Accessibility

Menu uses Base UI menu semantics. Arrow keys move among enabled items, Enter or Space activates one, and Escape closes the popup and returns focus. Keep native keyboard focus outlines and readable disabled actions. Highlighting stays visible in forced colors and through closing; reduced motion shows the completed popup immediately.