packages/twenty-docs/developers/extend/apps/layout/navigation-menu-items.mdx
A navigation menu item is an entry in the left sidebar. Use defineNavigationMenuItem() to ship custom sidebar links — typically one per view you ship — or to point at external URLs.
import { defineNavigationMenuItem, NavigationMenuItemType } from 'twenty-sdk/define';
import { EXAMPLE_VIEW_UNIVERSAL_IDENTIFIER } from '../views/example-view';
export default defineNavigationMenuItem({
universalIdentifier: '9327db91-afa1-41b6-bd9d-2b51a26efb4c',
name: 'example-navigation-menu-item',
icon: 'IconList',
color: 'blue',
position: 0,
type: NavigationMenuItemType.VIEW,
viewUniversalIdentifier: EXAMPLE_VIEW_UNIVERSAL_IDENTIFIER,
});
type determines what the menu item links to. Each type pairs with a specific identifier field:
| Type | What it does | Required field |
|---|---|---|
NavigationMenuItemType.VIEW | Opens a saved view | viewUniversalIdentifier |
NavigationMenuItemType.LINK | Opens an external URL | link |
NavigationMenuItemType.FOLDER | Groups nested items under a label | name (and child items reference the folder via folderUniversalIdentifier) |
NavigationMenuItemType.OBJECT | Opens an object's default index page | targetObjectUniversalIdentifier |
NavigationMenuItemType.PAGE_LAYOUT | Opens a standalone page layout | pageLayoutUniversalIdentifier |
position controls ordering in the sidebar.
icon and color are optional and customize how the entry looks.
folderUniversalIdentifier is also available on any item to nest it inside a FOLDER-type parent.