Dropdown

Dropdown can open a menu or any other element when the button is clicked.

Class name
Type
dropdownComponent Container element
dropdown-contentComponent Container for content
dropdown-end
Modifier
Aligns to end
dropdown-top
Modifier
Open from top
dropdown-bottom
Modifier
Open from bottom
dropdown-left
Modifier
Open from left
dropdown-right
Modifier
Open from right
dropdown-hover
Modifier
Opens on hover too
dropdown-open
Modifier
Force open

Method 1: using details and summary tags

Method 2: Using CSS focus

We can't use <button> here because Safari has a bug that prevents the button from being focused.
<div role="button" tabindex="0"> is a workaround for this bug.
It is accessible and works in all browsers.

Positions

Open on hover

Force open

# Force open

More examples

# Card as dropdown
# Helper dropdown
A normal text and a helper dropdown
Do you have a question? ask the community
Do you see a bug? open an issue on GitHub
Do you like daisyUI? tweet about it!
Support daisyUI's development: Open Collective
daisyUI store

Official daisyUI
Figma Library

Available on daisyUI store

More details