Skip to main content
K
Last modified: 4/Oct/2024

Select Option Group

The Select Option Group component it is used to group options inside the Select component.

#Usage

<Select onChange={handleOnChange}> <Select.OptionGroup label="Series"> <Select.Option value="stranger-things">Stranger Things</Select.Option> <Select.Option value="squid-game">Squid Game</Select.Option> </Select.OptionGroup> <Select.OptionGroup label="Movies"> <Select.Option value="new-top-gun">Top Gun Maverick</Select.Option> </Select.OptionGroup> </Select>

#Props

#label
Required
string | ReactElement<any, string | JSXElementConstructor<any>>
This label will show up on the UI
#children
Required
ReactNode
Items of the group

#Types

  • SelectOptionOrGroupElements: the type that includes the Select.Option, Select.OptionGroup and arrays of them.

Read more about types here


#See also