<div class="dropdown">
<label tabindex="0" class="btn m-1">dropdown</label>
<ul tabindex="0" class="dropdown-content menu p-2 shadow bg-base-100 rounded-box w-52">
<li><a href="#">item1</a></li>
<li><a href="#">item2</a></li>
</ul>
</div>
@!jrmc.dropdown({
text: 'dropdown',
items: [
{ text: 'item1', href: '#' },
{ text: 'item2', href: '#' },
]
})
Doc : daisyui dropdown
Dropdown can open a menu or any other element when the button is clicked.
Class name | Type | |
---|---|---|
dropdown | Component | Container element |
dropdown-content | Component | Container for content |
dropdown-end | Modifier | Aligns to end |
dropdown-top | Modifier | Open from top |
dropdown-left | Modifier | Open from left |
dropdown-right | Modifier | Open from right |
dropdown-hover | Modifier | Opens on hover too |
dropdown-open | Modifier | Force open |