Dropdown
Implementation#
Dropdown components can be used either via dot-notation (Dropdown.Menu) or using the components directly (DropdownMenu).
Default#
Example
Menu Start/End#
Example
Direction#
Example
Offset#
Example
Icon#
Example
Right-To-Left (rtl)#
Example
Props#
| Attribute | Type | Value | Default Value | Description |
|---|---|---|---|---|
| isOpen | boolean | Control internal isOpen boolean manually | ||
| onClick | function | Send onClick callback when user clicks outside menu | ||
| disableOutsideClick | boolean | Prevent outside click from closing menu | ||
| direction | string | top/right/bottom/left | bottom | Direction dropdown should appear around button |
| right | string | end | start | Direction menu should appear with set direction prop |
| offset | string | 4 | Distance from button menu should appear | |
| icon | boolean | true/false | undefined | Set Chevron Icon on Dropdown Toggle |
| rtl | boolean | true/false | undefined | Set Dropdown Toggle to right-to-left |