Sanity Library Reference Docs
    Preparing search index...

    Interface KnownMenuItemParams

    Known menu item parameters that control built-in behavior. These properties have specific meanings in the structure builder.

    interface KnownMenuItemParams {
        by?: SortOrderingItem[];
        extendedProjection?: string;
        hideSelectionIndicator?: boolean;
        layout?: string;
        value?: unknown;
    }
    Index

    Properties

    Sort ordering configuration for sort menu items. Used with the 'setSortOrder' action.

    extendedProjection?: string

    Extended projection string for sort ordering. Used internally for sort menu items.

    hideSelectionIndicator?: boolean

    When true, hides all visual indicators showing this menu item is selected. This includes both the checkmark icon and the pressed/selected styling. The item can still be selected - this only affects the visual feedback. Useful when you want the menu item to perform an action without showing a selection state.

    layout?: string

    Layout key for layout switching menu items. Used with the 'setLayout' action.

    value?: unknown

    The value to associate with this menu item for tracking selected state. Used with the 'setMenuItemState' action for custom toggle behavior. When a menu item is clicked, this value is stored against the menu item's id. Defaults to true if not specified.