React Hookers - v6.3.0
    Preparing search index...

    Interface HeadlessMenuItemProps<T>

    Props for the useMenuItem hook.

    interface HeadlessMenuItemProps<T> {
        expandDelay?: number;
        hasSubmenu?: boolean;
        id?: string;
        isDisabled?: boolean;
        onAction?: (value: T) => void;
        value?: T;
    }

    Type Parameters

    • T

      A value passed to the onAction handler.

    Index

    Properties

    expandDelay?: number

    A delay, in milliseconds, after which a submenu is expanded.

    200
    
    hasSubmenu?: boolean

    If true, the menu item controls a submenu and can be expanded or collapsed using ArrowRight or ArrowLeft.

    An expanded menu item with a submenu is considered active. onAction is ignored for menu items with a submenu.

    false
    
    id?: string

    An ID that uniquely identifies a menu item. If omitted, a fallback ID is generated.

    isDisabled?: boolean

    If true, the menu item is disabled.

    false
    
    onAction?: (value: T) => void

    A callback invoked when the user activates the menu item.

    value?: T

    A value passed to the onAction handler.