Skip to content
View Markdown

Menu ​

A button that opens a list of commands.

tsx
import { Menu, LabeledContent } from '@satinhq/kit'

Example ​

Click Sort Books, then Author to change the sort order.

Declare commands ​

Each action needs a stable id and a label. Add onPress to run it.

Show the current choice ​

Set checked on selection actions. Use role="destructive" for destructive commands and set disabled on an action to prevent choosing it.

Menu does not currently accept a top-level disabled prop. See Known issues.

Group commands ​

An action can contain a section or a submenu of actions. Keep each command tied to the current content.

API ​

Scroll horizontally to read every column.

PropTypeDescription
labelReactNodeThe trigger content.
actionsreadonly Action[]Commands, groups and submenus.
trigger(props: MenuTriggerProps) => ReactNodeOptional custom trigger.

Related: Quick start, List, Screen.

:::

Satin runs on the Lumen rendering engine and is open source under the MIT License.