Menu

A dropdown of actions or links from one trigger: Add new, row actions, the account menu. Items take a 16px icon in the quiet ink, groups take a caps MenuLabel, and MenuGroup holds a control such as the appearance switch. Arrow keys move, Enter picks, Escape closes.

import { Menu, MenuItem, MenuLabel, MenuSeparator, MenuGroup } from "@puckoops/camelot";
NameDescriptionDefaultControl
trigger*
ReactNode
--
children*
ReactNode
--
align
"start""center""end"
"end"
align
side
"top""right""bottom""left"
"bottom"
side
open
boolean
--
onOpenChange
(open: boolean) => void
--
minWidth
number
200

When to use

Use Menu for Add new, row actions, and the account menu.

  • Use Select instead when the user is choosing a value, not an action.

Examples

Row Actions

An icon button at the end of a row; its label names the row.

Grouped

Caps labels group the items; a disabled item explains itself in its label.

Account Menu

The sidebar's account menu, with the appearance switch in a MenuGroup.

All Variants

A primary trigger, a ghost trigger and a row's icon trigger.