Method 1: <details> and <summary>

Method 2: Popover API and anchor positioning

Dropdown menu

Positions

Modifiers

Force open

More examples

Card as dropdown

Helper dropdown

A normal text and a helper dropdown