📆 Don't miss our Sanity Showcase virtual meetup on March 20th!
@public
interface

MenuItem

Interface for menu items

Import

import {type MenuItem} from 'sanity/structure'

Signature

interface MenuItem {
  action?: MenuItemActionType
  group?: string
  i18n?: I18nTextRecord<'title'>
  icon?: React.ComponentType | React.ReactNode
  intent?: Intent
  params?: MenuItemParamsType
  showAsAction?: boolean
  title: string
}

Properties

action?: MenuItemActionType
action?: MenuItemActionType

Menu Item action

group?: string
group?: string

Menu Item group

i18n?: I18nTextRecord<'title'>
i18n?: I18nTextRecord<'title'>

The i18n key and namespace used to populate the localized title. This is the recommend way to set the title if you are localizing your studio.

icon?: React.ComponentType | React.ReactNode
icon?: React.ComponentType | React.ReactNode

Menu Item icon

intent?: Intent
intent?: Intent

Menu Item intent

params?: MenuItemParamsType
params?: MenuItemParamsType

Menu Item parameters. See MenuItemParamsType

showAsAction?: boolean
showAsAction?: boolean

Determine if it will show the MenuItem as action

title: string
title: string

Menu Item title. Note that the i18n configuration will take precedence and this title is left here as a fallback if no i18n key is provided and compatibility with older plugins

sanity@3.79.0