Where front components can be used
Front components can render in two locations within Twenty:- Side panel — Non-headless front components open in the right-hand side panel. This is the default behavior when a front component is triggered from the command menu.
- Widgets (dashboards and record pages) — Front components can be embedded as widgets inside page layouts. When configuring a dashboard or a record page layout, users can add a front component widget.
Basic example
The quickest way to see a front component in action is to register it as a command. Adding acommand field with isPinned: true makes it appear as a quick-action button in the top-right corner of the page — no page layout needed:
src/front-components/hello-world.tsx
yarn twenty dev (or running a one-shot yarn twenty dev --once), the quick action appears in the top-right corner of the page:

Configuration fields
| Field | Required | Description |
|---|---|---|
universalIdentifier | Yes | Stable unique ID for this component |
component | Yes | A React component function |
name | No | Display name |
description | No | Description of what the component does |
isHeadless | No | Set to true if the component has no visible UI (see below) |
command | No | Register the component as a command (see command options below) |
Placing a front component on a page
Beyond commands, you can embed a front component directly into a record page by adding it as a widget in a page layout. See the definePageLayout section for details.Headless vs non-headless
Front components come in two rendering modes controlled by theisHeadless option:
Non-headless (default) — The component renders a visible UI. When triggered from the command menu it opens in the side panel. This is the default behavior when isHeadless is false or omitted.
Headless (isHeadless: true) — The component mounts invisibly in the background. It does not open the side panel. Headless components are designed for actions that execute logic and then unmount themselves — for example, running an async task, navigating to a page, or showing a confirmation modal. They pair naturally with the SDK Command components described below.
src/front-components/sync-tracker.tsx
null, Twenty skips rendering a container for it — no empty space appears in the layout. The component still has access to all hooks and the host communication API.
SDK Command components
Thetwenty-sdk package provides four Command helper components designed for headless front components. Each component executes an action on mount, handles errors by showing a snackbar notification, and automatically unmounts the front component when done.
Import them from twenty-sdk/command:
Command— Runs an async callback via theexecuteprop.CommandLink— Navigates to an app path. Props:to,params,queryParams,options.CommandModal— Opens a confirmation modal. If the user confirms, executes theexecutecallback. Props:title,subtitle,execute,confirmButtonText,confirmButtonAccent.CommandOpenSidePanelPage— Opens a specific side panel page. Props:page,pageTitle,pageIcon.
Command to run an action from the command menu:
src/front-components/run-action.tsx
CommandModal to ask for confirmation before executing:
src/front-components/delete-draft.tsx
Accessing runtime context
Inside your component, use SDK hooks to access the current user, record, and component instance:src/front-components/record-info.tsx
| Hook | Returns | Description |
|---|---|---|
useUserId() | string or null | The current user’s ID |
useRecordId() | string or null | The current record’s ID (when placed on a record page) |
useFrontComponentId() | string | This component instance’s ID |
useFrontComponentExecutionContext(selector) | varies | Access the full execution context with a selector function |
Host communication API
Front components can trigger navigation, modals, and notifications using functions fromtwenty-sdk:
| Function | Description |
|---|---|
navigate(to, params?, queryParams?, options?) | Navigate to a page in the app |
openSidePanelPage(params) | Open a side panel |
closeSidePanel() | Close the side panel |
openCommandConfirmationModal(params) | Show a confirmation dialog |
enqueueSnackbar(params) | Show a toast notification |
unmountFrontComponent() | Unmount the component |
updateProgress(progress) | Update a progress indicator |
src/front-components/archive-record.tsx
Command options
Adding acommand field to defineFrontComponent registers the component in the command menu (Cmd+K). If isPinned is true, it also appears as a quick-action button in the top-right corner of the page.
| Field | Required | Description |
|---|---|---|
universalIdentifier | Yes | Stable unique ID for the command |
label | Yes | Full label shown in the command menu (Cmd+K) |
shortLabel | No | Shorter label displayed on the pinned quick-action button |
icon | No | Icon name displayed next to the label (e.g. 'IconBolt', 'IconSend') |
isPinned | No | When true, shows the command as a quick-action button in the top-right corner of the page |
availabilityType | No | Controls where the command appears: 'GLOBAL' (always available), 'RECORD_SELECTION' (only when records are selected), or 'FALLBACK' (shown when no other commands match) |
availabilityObjectUniversalIdentifier | No | Restrict the command to pages of a specific object type (e.g. only on Company records) |
conditionalAvailabilityExpression | No | A boolean expression to dynamically control whether the command is visible (see below) |
Conditional availability expressions
TheconditionalAvailabilityExpression 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:
| Variable | Type | Description |
|---|---|---|
pageType | string | Current page type (e.g. 'RecordIndexPage', 'RecordShowPage') |
isInSidePanel | boolean | Whether the component is rendered in a side panel |
numberOfSelectedRecords | number | Number of currently selected records |
isSelectAll | boolean | Whether “select all” is active |
selectedRecords | array | The selected record objects |
favoriteRecordIds | array | IDs of favorited records |
objectPermissions | object | Permissions for the current object type |
targetObjectReadPermissions | object | Read permissions for the target object |
targetObjectWritePermissions | object | Write permissions for the target object |
featureFlags | object | Active feature flags |
objectMetadataItem | object | Metadata of the current object type |
hasAnySoftDeleteFilterOnView | boolean | Whether the current view has a soft-delete filter |
| Operator | Description |
|---|---|
isDefined(value) | true if the value is not null/undefined |
isNonEmptyString(value) | true if the value is a non-empty string |
includes(array, value) | true if the array contains the value |
includesEvery(array, prop, value) | true if every item’s property includes the value |
every(array, prop) | true if the property is truthy on every item |
everyDefined(array, prop) | true if the property is defined on every item |
everyEquals(array, prop, value) | true if the property equals the value on every item |
some(array, prop) | true if the property is truthy on at least one item |
someDefined(array, prop) | true if the property is defined on at least one item |
someEquals(array, prop, value) | true if the property equals the value on at least one item |
someNonEmptyString(array, prop) | true if the property is a non-empty string on at least one item |
none(array, prop) | true if the property is falsy on every item |
noneDefined(array, prop) | true if the property is undefined on every item |
noneEquals(array, prop, value) | true if the property does not equal the value on any item |
Public assets
Front components can access files from the app’spublic/ directory using getPublicAssetUrl:
Styling
Front components support multiple styling approaches. You can use:- Inline styles —
style={{ color: 'red' }} - Twenty UI components — import from
twenty-sdk/ui(Button, Tag, Status, Chip, Avatar, and more) - Emotion — CSS-in-JS with
@emotion/react - Styled-components —
styled.divpatterns - Tailwind CSS — utility classes
- Any CSS-in-JS library compatible with React