Dropdown Menu
Displays a menu to the user—such as a set of actions or functions—triggered by a button.
Loading...
Anatomy
Import all parts and piece them together.
API Reference
Trigger
The button that toggles the dropdown menu. By default, the DropdownMenu.Content will position itself against the trigger.
Prop | Default | Type |
---|---|---|
side | — | DropdownSide The preferred side of the trigger to render against when open. Will be reversed when collisions occur and `avoidCollisions` is enabled. |
align | — | DropdownAlign The preferred alignment against the trigger. May change when collisions occur. |
sideOffset | — | number The distance in pixels from the trigger. |
alignOffset | — | number An offset in pixels from the "start" or "end" alignment options. |
Data Attribute | Value |
---|---|
[data-state] | "open" | "closed" |
[data-disabled] | Present when disabled |
Content
The component that pops out when the dropdown menu is open.
Prop | Default | Type |
---|