Dropdown
Dropdown is used to show a list of options when clicking on a trigger element.
Installation
npx jsx-daisyui add dropdownDefault
dropdown-default
Positions
dropdown-positions
Alignment
dropdown-align
Hover
dropdown-hover
Props
Dropdown
| Prop | Type | Default | Description |
|---|---|---|---|
position | 'top' | 'bottom' | 'left' | 'right' | - | The opening position of the dropdown menu. |
align | 'start' | 'center' | 'end' | - | The alignment of the dropdown menu. |
hover | boolean | - | Opens the dropdown on hover. |
open | boolean | - | Forces the dropdown to stay open. |
close | boolean | - | Forces the dropdown to close. |
Dropdown.Item
| Prop | Type | Default | Description |
|---|---|---|---|
anchor | boolean | true | Determines if the item should be rendered inside an anchor tag (<a>). If false, it renders its children directly. |