Skip to main content
A command menu item is the bridge between the user and a front component. It registers the component in Twenty’s command menu (Cmd+K) and, optionally, as a pinned quick-action button in the top-right corner of the page.
src/command-menu-items/open-dashboard.command-menu-item.ts

Configuration fields

Headless commands

A command menu item paired with a headless front component is the idiomatic way to ship a one-click action — run code, navigate, or confirm and execute. The Front Components page covers the SDK Command components (Command, CommandLink, CommandModal, CommandOpenSidePanelPage) that handle the action-and-unmount pattern. A typical flow: a headless component renders <Command execute={...} /> (see the full example), and the command menu item points at it:
src/command-menu-items/run-action.command-menu-item.ts

Conditional availability expressions

The conditionalAvailabilityExpression field lets you control when a command is visible based on the current page context. Import typed variables and operators from twenty-sdk to build expressions:
src/command-menu-items/bulk-update.command-menu-item.ts
RECORD_SELECTION already implies a non-empty selection — use numberOfSelectedRecords only for specific counts (e.g. >= 2).

Context variables

These represent the current state of the page:

Operators

Combine variables into boolean expressions: