Skip to content

useOption API

API reference docs for the useOption hook. Learn about the input parameters and other APIs of this exported module.

Demos

For examples and details on the usage of this React hook, visit the demo pages:

    Import

    import useOption from '@mui/base/useOption';

    Parameters

    NameTypeDefaultDescription
    disabled*boolean
    value*Value
    optionRefReact.Ref<HTMLElement>

    Return value

    NameTypeDefaultDescription
    getRootProps<Other extends EventHandlers>(otherHandlers?: Other) => UseOptionRootSlotProps<Other>
    highlightedboolean
    indexnumber
    selectedboolean