Dropdown
A floating menu triggered by hover or click on an element.
When to Use
- For contextual menus on buttons or other elements
- To show a list of actions without cluttering the interface
- For split-button patterns with a primary action and more options
Import
Examples
Basic
Hover to show a dropdown menu.
With Icons
Add icons to menu items.
Click Trigger
Open on click instead of hover.
Disabled Items
Dropdown.Button
A split button with a primary action and a dropdown for more options.
API
DropdownProps
menu—{ items: MenuItem[] }— Menu configurationtrigger—("hover" | "click" | "contextMenu")[]— How to open (default:["hover"])placement—"top" | "topLeft" | "topRight" | "bottom" | "bottomLeft" | "bottomRight"— Menu position (default:"bottomLeft")open—boolean— Controlled open stateonOpenChange—(open: boolean) => void— Open state callbackdisabled—boolean— Disable the dropdownarrow—boolean— Show arrow pointing to triggeroverlayClassName—string— Custom CSS class for the overlaydestroyPopupOnHide—boolean— Unmount popup when hiddenautoAdjustOverflow—boolean— Auto-adjust position to fit viewport (default:true)
Dropdown.Button Props
icon—ReactNode— Custom dropdown arrow iconsize—"small" | "middle" | "large"— Button sizetype—"primary" | "default" | "dashed" | "text" | "link"— Button typedanger—boolean— Danger stylingloading—boolean— Loading stateonClick—() => void— Primary button click handler
MenuItem
key—string— Unique identifierlabel—ReactNode— Item texticon—ReactNode— Item icondisabled—boolean— Disable the itemdanger—boolean— Danger stylingchildren—MenuItem[]— Sub-menu itemstype—"divider"— Render as a divider