v1.3.0 28

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.

html
Default (MD) ⌘K
Compact (SM) ⌘K
<div class="vt-flex vt-flex-col vt-gap-1 vt-w-56">
  <div class="vt-command-item">
    <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" class="vt-command-item-icon" aria-hidden="true">
      <path d="M20 21.0001C19.713 17.269 16.7289 14.3151 12.995 14.0662L12 13.9999C11.6446 14.0096 11.3134 14.0225 11.0008 14.0378C7.3 14.2192 4.28417 17.3057 4 21.0001" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><circle cx="12" cy="6.99988" r="4" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></circle>
    </svg>
    Default (MD)
    <kbd class="vt-command-shortcut">⌘K</kbd>
  </div>
  <div class="vt-command-item vt-command-item-sm">
    <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" class="vt-command-item-icon" aria-hidden="true">
      <path d="M20 21.0001C19.713 17.269 16.7289 14.3151 12.995 14.0662L12 13.9999C11.6446 14.0096 11.3134 14.0225 11.0008 14.0378C7.3 14.2192 4.28417 17.3057 4 21.0001" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><circle cx="12" cy="6.99988" r="4" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></circle>
    </svg>
    Compact (SM)
    <kbd class="vt-command-shortcut">⌘K</kbd>
  </div>
</div>

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.

html
Profile
Settings
Starred
Trash
<div class="vt-flex vt-flex-col vt-gap-1 vt-w-52">
  <div class="vt-command-item">
    <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" class="vt-command-item-icon" aria-hidden="true">
      <path d="M20 21.0001C19.713 17.269 16.7289 14.3151 12.995 14.0662L12 13.9999C11.6446 14.0096 11.3134 14.0225 11.0008 14.0378C7.3 14.2192 4.28417 17.3057 4 21.0001" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><circle cx="12" cy="6.99988" r="4" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></circle>
    </svg>
    Profile
  </div>
  <div class="vt-command-item">
    <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" class="vt-command-item-icon" aria-hidden="true">
      <path d="M3.95631 10.5829L3.03254 9.07084C2.74505 8.60024 2.7389 8.00978 3.01652 7.5333L3.63533 6.47124C3.90953 6.00064 4.41721 5.71571 4.96162 5.7269L6.69131 5.76245C6.92616 5.76728 7.15379 5.68727 7.34333 5.54846C7.79531 5.21745 8.28334 4.93276 8.80042 4.70139C9.01191 4.60675 9.19222 4.45165 9.30469 4.24903L10.1203 2.77965C10.3847 2.30328 10.8865 2.00781 11.4312 2.00781H12.6937C13.2384 2.00781 13.7403 2.30329 14.0047 2.77966L14.8202 4.24902C14.9327 4.45165 15.113 4.60675 15.3245 4.70139C15.8416 4.93274 16.3296 5.2174 16.7815 5.54838C16.9711 5.68718 17.1987 5.76718 17.4336 5.76235L19.1634 5.72676C19.7078 5.71557 20.2155 6.00049 20.4897 6.47111L21.1085 7.53314C21.3862 8.00963 21.38 8.60009 21.0925 9.07068L20.1687 10.5828C20.0481 10.7803 20.002 11.0134 20.0235 11.2439C20.0707 11.7486 20.0707 12.267 20.0235 12.7717C20.002 13.0022 20.0481 13.2353 20.1687 13.4329L21.0924 14.9448C21.3799 15.4154 21.3861 16.0058 21.1084 16.4823L20.4896 17.5444C20.2154 18.015 19.7077 18.2999 19.1633 18.2887L17.4338 18.2531C17.1989 18.2483 16.9713 18.3283 16.7817 18.4671C16.3297 18.7982 15.8416 19.0829 15.3245 19.3142C15.113 19.4089 14.9327 19.564 14.8202 19.7666L14.0047 21.236C13.7403 21.7123 13.2384 22.0078 12.6937 22.0078H11.4312C10.8866 22.0078 10.3847 21.7123 10.1203 21.236L9.30468 19.7665C9.19222 19.5639 9.01191 19.4088 8.80042 19.3142C8.28329 19.0828 7.79519 18.798 7.34316 18.467C7.15362 18.3282 6.92597 18.2482 6.69111 18.253L4.96175 18.2886C4.41733 18.2998 3.90963 18.0148 3.63543 17.5442L3.01663 16.4822C2.739 16.0057 2.74515 15.4152 3.03264 14.9446L3.95631 13.4327C4.07699 13.2351 4.12309 13.002 4.10154 12.7715C4.05437 12.267 4.05438 11.7486 4.10154 11.244C4.12308 11.0135 4.07699 10.7805 3.95631 10.5829Z" stroke="currentColor" stroke-width="1.5"></path><circle cx="12.0625" cy="12.0078" r="3.5" stroke="currentColor" stroke-width="1.5"></circle>
    </svg>
    Settings
  </div>
  <div class="vt-command-item">
    <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" class="vt-command-item-icon" aria-hidden="true">
      <path d="M12.7972 2.90494C13.2554 3.57043 13.9479 4.70769 14.6514 6.04507C15.1942 7.07701 15.4657 7.59298 15.8551 7.86959C16.2444 8.14621 16.812 8.2313 17.9472 8.40149C19.5204 8.63736 20.6806 8.89214 21.3467 9.05516C21.735 9.15017 21.9976 9.50036 21.9976 9.9001C21.9976 10.1262 21.9127 10.344 21.7606 10.5113C21.0637 11.2777 20.3487 12.0836 19.4701 12.961C18.605 13.8249 18.1724 14.2569 18.0253 14.7261C17.8781 15.1954 17.9834 15.7792 18.1939 16.9469C18.3735 17.9433 18.5569 19.1306 18.6921 20.4219C18.7528 21.0024 18.2921 21.5 17.7085 21.5C17.6522 21.5 17.5967 21.4962 17.542 21.4824C17.0502 21.3578 15.919 20.7845 14.1246 19.7243C13.0722 19.1025 12.5461 18.7917 11.9993 18.7917C11.4526 18.7917 10.9265 19.1026 9.87427 19.7244C8.08025 20.7845 6.94977 21.3578 6.45797 21.4824C6.40334 21.4962 6.34784 21.5 6.29148 21.5C5.70788 21.5 5.24716 21.0024 5.30793 20.4219C5.44314 19.1306 5.6265 17.9433 5.80612 16.9469C6.01661 15.7792 6.12186 15.1954 5.97471 14.7261C5.82756 14.2569 5.395 13.8249 4.52987 12.961C3.65132 12.0836 2.93633 11.2777 2.23944 10.5113C2.08729 10.344 2.00244 10.1262 2.00244 9.9001C2.00244 9.50036 2.265 9.15017 2.65328 9.05516C3.31945 8.89214 4.4796 8.63736 6.05284 8.40149C7.18801 8.2313 7.75559 8.14621 8.14498 7.86958C8.53437 7.59295 8.80577 7.07698 9.34859 6.04505C10.0521 4.70768 10.7445 3.57044 11.2026 2.90495C11.3825 2.64364 11.6827 2.5 11.9999 2.5C12.3171 2.5 12.6173 2.64364 12.7972 2.90494Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path>
    </svg>
    Starred
  </div>
  <div class="vt-command-item">
    <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" class="vt-command-item-icon" aria-hidden="true">
      <path d="M18.8516 16.3743L19.5 6H4.5L5.14839 16.3743C5.315 19.0401 5.39831 20.373 6.26426 21.1865C7.13021 22 8.46571 22 11.1367 22H12.8633C15.5343 22 16.8698 22 17.7357 21.1865C18.6017 20.373 18.685 19.0401 18.8516 16.3743Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="M16 6H21M16 6L15.3778 4.34082C15.0007 3.33524 14.8122 2.83245 14.4402 2.50292C14.3213 2.39765 14.1904 2.3069 14.0501 2.2326C13.6109 2 13.074 2 12 2C10.926 2 10.3891 2 9.9499 2.2326C9.8096 2.3069 9.67865 2.39765 9.55982 2.50292C9.18783 2.83245 8.99928 3.33524 8.62219 4.34082L8 6M16 6H8M3 6H8" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="M9.5 11V17M14.5 11V17" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path>
    </svg>
    Trash
  </div>
</div>

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.

html
New Team
Inbox
3
Settings
<div class="vt-flex vt-flex-col vt-gap-1 vt-w-56">
  <div class="vt-command-item vt-justify-between">
    <div class="vt-flex vt-items-center vt-gap-2">
      <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" class="vt-command-item-icon" aria-hidden="true">
        <path d="M11.9922 4.00012V20.0001M19.9922 12.0001H3.99222" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path>
      </svg>
      <span>New Team</span>
    </div>
    <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" class="vt-command-item-icon" aria-hidden="true">
      <path d="M9.00005 18C9.00005 18 15 13.5811 15 12C15 10.4188 9 6 9 6" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path>
    </svg>
  </div>
  <div class="vt-command-item vt-justify-between">
    <span>Inbox</span>
    <div class="vt-badge vt-badge-secondary">
      3
    </div>
  </div>
  <div class="vt-command-item vt-justify-between">
    <span>Settings</span>
    <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" class="vt-command-item-icon" aria-hidden="true">
      <path d="M3.95631 10.5829L3.03254 9.07084C2.74505 8.60024 2.7389 8.00978 3.01652 7.5333L3.63533 6.47124C3.90953 6.00064 4.41721 5.71571 4.96162 5.7269L6.69131 5.76245C6.92616 5.76728 7.15379 5.68727 7.34333 5.54846C7.79531 5.21745 8.28334 4.93276 8.80042 4.70139C9.01191 4.60675 9.19222 4.45165 9.30469 4.24903L10.1203 2.77965C10.3847 2.30328 10.8865 2.00781 11.4312 2.00781H12.6937C13.2384 2.00781 13.7403 2.30329 14.0047 2.77966L14.8202 4.24902C14.9327 4.45165 15.113 4.60675 15.3245 4.70139C15.8416 4.93274 16.3296 5.2174 16.7815 5.54838C16.9711 5.68718 17.1987 5.76718 17.4336 5.76235L19.1634 5.72676C19.7078 5.71557 20.2155 6.00049 20.4897 6.47111L21.1085 7.53314C21.3862 8.00963 21.38 8.60009 21.0925 9.07068L20.1687 10.5828C20.0481 10.7803 20.002 11.0134 20.0235 11.2439C20.0707 11.7486 20.0707 12.267 20.0235 12.7717C20.002 13.0022 20.0481 13.2353 20.1687 13.4329L21.0924 14.9448C21.3799 15.4154 21.3861 16.0058 21.1084 16.4823L20.4896 17.5444C20.2154 18.015 19.7077 18.2999 19.1633 18.2887L17.4338 18.2531C17.1989 18.2483 16.9713 18.3283 16.7817 18.4671C16.3297 18.7982 15.8416 19.0829 15.3245 19.3142C15.113 19.4089 14.9327 19.564 14.8202 19.7666L14.0047 21.236C13.7403 21.7123 13.2384 22.0078 12.6937 22.0078H11.4312C10.8866 22.0078 10.3847 21.7123 10.1203 21.236L9.30468 19.7665C9.19222 19.5639 9.01191 19.4088 8.80042 19.3142C8.28329 19.0828 7.79519 18.798 7.34316 18.467C7.15362 18.3282 6.92597 18.2482 6.69111 18.253L4.96175 18.2886C4.41733 18.2998 3.90963 18.0148 3.63543 17.5442L3.01663 16.4822C2.739 16.0057 2.74515 15.4152 3.03264 14.9446L3.95631 13.4327C4.07699 13.2351 4.12309 13.002 4.10154 12.7715C4.05437 12.267 4.05438 11.7486 4.10154 11.244C4.12308 11.0135 4.07699 10.7805 3.95631 10.5829Z" stroke="currentColor" stroke-width="1.5"></path><circle cx="12.0625" cy="12.0078" r="3.5" stroke="currentColor" stroke-width="1.5"></circle>
    </svg>
  </div>
</div>

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.

html
Comfortable More room between rows
Compact Fits more on the screen
<div class="vt-w-full vt-max-w-xs vt-flex vt-flex-col vt-gap-1">
  <div class="vt-command-item" role="menuitemradio" aria-checked="false">
    <span class="vt-command-item-content">
      <span class="vt-command-item-title">Comfortable</span>
      <span class="vt-command-item-description">More room between rows</span>
    </span>
    <span class="vt-command-item-check vt-command-item-check-end"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" aria-hidden="true">
        <path d="M5 13.2592L7.58583 15.9568C8.2525 16.6523 8.58583 17 9.00004 17C9.41425 17 9.74759 16.6523 10.4143 15.9568L19 7" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path>
      </svg></span>
  </div>
  <div class="vt-command-item" role="menuitemradio" aria-checked="true">
    <span class="vt-command-item-content">
      <span class="vt-command-item-title">Compact</span>
      <span class="vt-command-item-description">Fits more on the screen</span>
    </span>
    <span class="vt-command-item-check vt-command-item-check-end"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" aria-hidden="true">
        <path d="M5 13.2592L7.58583 15.9568C8.2525 16.6523 8.58583 17 9.00004 17C9.41425 17 9.74759 16.6523 10.4143 15.9568L19 7" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path>
      </svg></span>
  </div>
</div>

With End Switch

An on/off row: a switch at the end shows the state. The row is the control (role=&quot;menuitemcheckbox&quot; with aria-checked); the switch is a decorative span, so there is no button inside the row.

html
Status bar
Minimap
<div class="vt-w-full vt-max-w-xs vt-flex vt-flex-col vt-gap-1">
  <div class="vt-command-item" role="menuitemcheckbox" aria-checked="true">
    Status bar
    <span class="vt-switch vt-switch-sm vt-active" aria-hidden="true"><span class="vt-switch-thumb"></span></span>
  </div>
  <div class="vt-command-item" role="menuitemcheckbox" aria-checked="false">
    Minimap
    <span class="vt-switch vt-switch-sm" aria-hidden="true"><span class="vt-switch-thumb"></span></span>
  </div>
</div>

States

Default, selected (the highlighted row — hover looks the same) and disabled.

html
Default
Selected
Disabled
<div class="vt-flex vt-flex-col vt-gap-1 vt-w-48">
  <div class="vt-command-item">Default</div>
  <div class="vt-command-item vt-selected">Selected</div>
  <div class="vt-command-item" aria-disabled="true">Disabled</div>
</div>

Destructive

vt-command-danger: error text and icon for actions that delete or remove data; highlighted (hover or selected) on the error surface.

html
Delete item
Remove all
<div class="vt-flex vt-flex-col vt-gap-1 vt-w-56">
  <div class="vt-command-item vt-command-danger">
    <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" class="vt-command-item-icon" aria-hidden="true">
      <path d="M18.8516 16.3743L19.5 6H4.5L5.14839 16.3743C5.315 19.0401 5.39831 20.373 6.26426 21.1865C7.13021 22 8.46571 22 11.1367 22H12.8633C15.5343 22 16.8698 22 17.7357 21.1865C18.6017 20.373 18.685 19.0401 18.8516 16.3743Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="M16 6H21M16 6L15.3778 4.34082C15.0007 3.33524 14.8122 2.83245 14.4402 2.50292C14.3213 2.39765 14.1904 2.3069 14.0501 2.2326C13.6109 2 13.074 2 12 2C10.926 2 10.3891 2 9.9499 2.2326C9.8096 2.3069 9.67865 2.39765 9.55982 2.50292C9.18783 2.83245 8.99928 3.33524 8.62219 4.34082L8 6M16 6H8M3 6H8" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="M9.5 11V17M14.5 11V17" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path>
    </svg>
    Delete item
  </div>
  <div class="vt-command-item vt-command-danger vt-selected">
    <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" class="vt-command-item-icon" aria-hidden="true">
      <path d="M18.8516 16.3743L19.5 6H4.5L5.14839 16.3743C5.315 19.0401 5.39831 20.373 6.26426 21.1865C7.13021 22 8.46571 22 11.1367 22H12.8633C15.5343 22 16.8698 22 17.7357 21.1865C18.6017 20.373 18.685 19.0401 18.8516 16.3743Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="M16 6H21M16 6L15.3778 4.34082C15.0007 3.33524 14.8122 2.83245 14.4402 2.50292C14.3213 2.39765 14.1904 2.3069 14.0501 2.2326C13.6109 2 13.074 2 12 2C10.926 2 10.3891 2 9.9499 2.2326C9.8096 2.3069 9.67865 2.39765 9.55982 2.50292C9.18783 2.83245 8.99928 3.33524 8.62219 4.34082L8 6M16 6H8M3 6H8" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="M9.5 11V17M14.5 11V17" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path>
    </svg>
    Remove all
  </div>
</div>

Guidelines

Profile
Settings
Do Pair each item with a muted leading icon for quick scanning.
Delete item
Remove all
Don't Don't fill a menu with competing destructive red items.

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