Function: Dropdown()
Dropdown(
props
):Element
The Dropdown component is a UI element that provides a dropdown menu with customizable options. It supports horizontal or vertical toggle directions, and customization options for each item, including text, icons, and their positions.
Parameters
Parameter | Type | Description |
---|---|---|
props | DropdownProps | Dropdown component props |
Returns
Element
See
Storybook - Dropdown (opens in a new tab)
Example
<Dropdown
options={[
{ key: '1', text: 'Option 1', onClick: () => console.log('Option 1 clicked') },
{ key: '2', text: 'Option 2', icon: <SomeIcon />, iconPosition: 'right' },
]}
toggleDirection="vertical"
/>
Defined in
packages/react-material-ui/src/components/Dropdown/Dropdown.tsx:63 (opens in a new tab)