Skip to content

Unstyled Select

The Select components let you create lists of options for users to choose from.

useOption API

Import

import useOption from '@mui/base/useOption';
// or
import { useOption } from '@mui/base';
You can learn about the difference by reading this guide on minimizing bundle size.

Parameters

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

Return value

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


useSelect API

Import

import useSelect from '@mui/base/useSelect';
// or
import { useSelect } from '@mui/base';
You can learn about the difference by reading this guide on minimizing bundle size.

Parameters

NameTypeDescription

Return value

NameTypeDescription