Menu Item
Atomic list item used across menus, dropdowns, command palettes, and navigation. Supports icons, chevrons, badges, and destructive states.
Sizes
MD, a 32px row, and SM, a 24px row for dense menus. Use one size per menu.
With Icon
Optional leading icon for visual context. Icon uses foreground-muted color for secondary weight. In Figma the start of the row is the Leading slot: the icon by default, or a small Checkbox or Radio, an Avatar. The check mark of a picked row is the Check icon in the Trailing slot; the other rows of the list have Trailing switched off.
Right Slot
Optional right-side content: chevron for submenus, badge, or icon. In Figma the end of the row is the Trailing slot, empty by default: a check mark, a small Switch, a Badge or a count go there; the shortcut stays its own part.
With Description and End Check
A title over a short muted description, and a check at the end on the chosen row — the mode-picker row. The description is inside the row, so it is read as part of its name.
With End Switch
An on/off row: a switch at the end shows the state. The row is the control (role="menuitemcheckbox" with aria-checked); the switch is a decorative span, so there is no button inside the row.
States
Default, selected (the highlighted row — hover looks the same) and disabled.
Destructive
vt-command-danger: error text and icon for actions that delete or remove data; highlighted (hover or selected) on the error surface.
Guidelines
API Reference
| Class | Type | Description |
|---|---|---|
vt-command-item |
Base | Menu item base: flex row, gap, padding, hover state, cursor |
vt-selected |
State | Selected (highlighted) row — the same background as hover; vt-active works too |
aria-disabled="true" |
State | Disabled state — 50% opacity, no pointer events |
vt-command-item-sm |
Size | Compact row for dense menus — 24px tall: Caption (12px) text, 4px × 8px padding, 6px gap; icons and checks stay 16px |
vt-justify-between |
Layout | Pushes left content and right slot to opposite ends |
vt-command-item-icon |
Part | Leading icon — 16px, muted for secondary visual weight |
vt-command-shortcut |
Part | Keyboard shortcut pushed to the end of the item |
vt-command-item-check |
Part | Leading check mark (brand) — shown when the item is aria-checked or aria-selected, keeps its space otherwise. In Figma the picked row has the Check icon in its Trailing slot |
vt-command-item-content |
Part | Title (vt-command-item-title) over a description (vt-command-item-description: Caption, muted); the row aligns its icon and check to the first line |
vt-switch |
Part | Switch at the very end of an on/off row (vt-switch vt-switch-sm, a span with aria-hidden, vt-active when on) — the row is role="menuitemcheckbox" with aria-checked; the switch only shows the state |
vt-command-item-check-end |
Part | Check at the very end (after a shortcut) for a pick-one row — role="menuitemradio" with aria-checked; shown on the checked row |
vt-command-item-chevron |
Part | Submenu chevron at the end of the row (16px, muted): the row opens a nested menu — give it aria-haspopup="menu" |
vt-checkbox/vt-radio |
Part | Leading checkbox or radio of a checkable item (dropdown menu) |
vt-command-danger |
Modifier | Destructive item — error text and icon, error surface when highlighted (hover or selected) |
Accessibility
| Feature | Details |
|---|---|
| Role | Use role="menuitem" on each item inside a role="menu" container |
| Keyboard | Arrow keys move focus between items; Enter/Space activates |
| Disabled | Use aria-disabled="true" instead of the disabled attribute for menu items |
| Destructive | Add aria-label or visible text to clarify destructive intent |