Skip to content

Native Select

<select class="native-select">
<option>Developer</option>
<option>Designer</option>
</select>

Deploys go to the selected environment.

The class resets the platform arrow and draws its own on the trailing edge, so the control matches the inputs beside it. Everything else is the browser’s.

AttributeMeaning
data-size="sm"The shorter height, to match .btn-sm
multipleGrows into a list box; give it a height

Pick a plan to continue.

There is no custom select in partialkit, and that is deliberate for now.

Native selectA custom listbox
Keyboard, type-ahead, screen readerFrom the platformYou implement all of it
MobileThe system picker, which users already knowA panel you have to make work on touch
Option contentText onlyAnything
Styling of the open listBarelyComplete
Submits in a plain formYesNeeds a hidden input

Reach for the native one unless you need rich option content — icons, avatars, two lines of text. The custom version costs a lot of behaviour to rebuild, and rebuilding it badly is worse than a plain select.

Set dir="rtl" on the page or on any subtree — padding, corners and positions follow the reading direction on their own. See the button page for a live example.

A select needs a name like any control. When there is no visible label, use aria-label.

An empty first option is how you say “nothing chosen yet” — <option value="">Choose one</option> — so required can actually reject it. There is no placeholder attribute on a select.