Dropdown Menu
The Dropdown Menu displays a list of actions or options when a user interacts with a trigger element.
Imports
`Root` - The root of the component, what wraps everything.
`Trigger` - The trigger that opens the dropdown.
`Content` - The content, what's displayed to the user.
`Seperator` - A seperator between items.
`SubMenu` - A submenu that opens when hovered.
`SubTrigger` - The trigger that opens the submenu.
`SubContent` - The content of the submenu.
`Item` - An item in the dropdown.
Installation
npx neel-ui add dropdown-menu
Example
API Reference
Props of the `Dropdown Menu` component. `*` denotes the default value. As it is an extension of the `Popover` component, it also inherits the props of the `Popover` component.
Attribute
Type
Description
Parent
closeOnClick
`boolean`
If the dropdown should close when an item is clicked. Defaults to `false`.
`Item`
placement
What side the sub-content should open on, defaults to `bottom`.
`SubContent`
fullWidthOfTrigger
`boolean`
If the content should be the full width of the trigger, defaults to `false`.
`Content`