A dropdown menu displays a list of actions or options to a user.
View source code(T | OptionGroup<T>)[]
The list of options in the menu.
(getToggleButtonProps: (options?: GetToggleButtonPropsOptions) => ToggleButtonProps, isDropdownOpened: boolean) => ReactNode
Function to render the button.
string
className for the element.
string
Maximum height of the dropdown content.
boolean
Whether the dropdown should stay open when an option is selected.
Default: false(option: T) => void
Handler that is called when a option is selected.
"bottom-end" | "bottom-start" | "end-bottom" | "end-top" | "top-end" | "top-start"
Placement the menu will render relative to the field.
Default: bottom-start(option: T, index: number, state?: { isSelected: boolean; }) => ReactNode
Function to render option. Should return DropdownItem(s).
(optionGroup: OptionGroup<T>) => ReactNode
Function to render option group.