ZAO造

Menu

A short list of actions attached to a trigger.

Preview

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

Choose an action to see its result.

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.

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.