---
title: Dropdown
desc: Dropdown can open a menu or any other element when the button is clicked.
layout: components
classnames:
component:
- class: dropdown
desc: Dropdown container
part:
- class: dropdown-content
desc: Content part
placement:
- class: dropdown-start
desc: Align horizontally to start of button
default: true
- class: dropdown-center
desc: Align horizontally to center of button
- class: dropdown-end
desc: Align horizontally to end of button
- class: dropdown-top
desc: Open from top
- class: dropdown-bottom
desc: Open from bottom
default: true
- class: dropdown-left
desc: Open from left
- class: dropdown-right
desc: Open from right
modifier:
- class: dropdown-hover
desc: Opens on hover too
- class: dropdown-open
desc: Force open
---
## There are 3 methods to use a dropdowns
1. [details and summary elements](#method-1-details-and-summary)
2. [popover API and anchor positioning `new`](#method-2-popover-api-and-anchor-positioning-new)
3. [CSS focus](#method-3-css-focus)
## Method 1. details and summary
details and summary are native HTML elements that can be used to create dropdowns.
Dropdown using details and summary opens and closes the content when the summary is clicked. You can also open/close it using JS by adding/removing the `open` attribute
```:Structure
Container for the button + content
│
│ button to toggle the visibility of the content
│ │
open or close
──╯
Content
open or close
open or close
This is a card. You can use any element as a dropdown.
This is a card. You can use any element as a dropdown.
Here is a description!
Here is a description!