Dropdown
A floating panel triggered by a button, with focus management, keyboard dismissal and optional hover opening.
Examples
Without a title
Without title the panel has no header, so pass aria-label. className sets the panel width and layout (w-72, w-auto). The design system CSS has no @layer, so it wins over utility classes: set the panel padding and radius with --var-dropdown-surface-padding and --var-dropdown-surface-radius, not with p-* or rounded-*. initialFocus picks the element that receives focus.
When to use Dropdown
Use when
You need the documented Dropdown interaction or presentation in a product workflow.
Avoid when
A native HTML element already provides the Dropdown behavior you need.
Accessibility
Keep the Dropdown labeled and use its documented keyboard interaction. The component preserves visible focus and communicates state without relying on color alone.