Sanity Library Reference Docs
    Preparing search index...

    Interface MenuItem

    Interface for menu items

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

    Properties

    Menu Item action

    group?: string

    Menu Item group

    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?: ReactNode | ComponentType<{}>

    Menu Item icon

    intent?: Intent

    Menu Item intent

    Menu Item parameters. See MenuItemParamsType

    showAsAction?: boolean

    Determine if it will show the MenuItem as action

    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