Dropdowns
Dropdown menus and custom selects without JavaScript.
Dropdowns are built with <details role="list">
as a wrapper and <summary>
and <ul>
as direct childs.
For style consistency with the form elements, dropdowns are styled like a <select>
by default.
Dropdown
role="button"
on the <summary>
element can be used to turn the dropdown into a button.
Dropdown as a button 1
Dropdown as a button 2
Dropdown as a button 3
Dropdowns can be used as custom selects with <input type="radio">
or <input type="checkbox">
Select single element
Select multiple elements