# Customizable Select: Style Native Dropdowns Without JavaScript

URL: https://theosoti.com/blog/css-customizable-select-without-javascript/
Published: 2026-12-04
Author: Theo Soti
Tags: CSS, modern CSS, HTML, forms, accessibility, JavaScript alternatives, frontend tutorial


> Use appearance: base-select to style a real select element with rich options, a custom picker, and animations, while keeping keyboard and form support.

## The dropdown everyone rebuilds

Picture an issue tracker. Every issue has a status, and the design gives each status a colored dot and a short description in the list:

- To do: Not started yet
- In progress: Someone is on it
- In review: Waiting for approval
- Done: Shipped to production

When the list is closed, the field shows only the dot and the name.

A native `<select>` could not do that. Options rendered text only, and the operating system drew the open list, so CSS barely reached it. You could restyle the closed box with `appearance: none` and a background arrow, but the list stayed out of reach.

So the select usually gets replaced with a JavaScript component. That component has to rebuild a lot: a button, a list with `role="listbox"`, ARIA states kept in sync, arrow keys, typeahead, Escape, clicks outside, focus return, positioning near the edges of the viewport, and a hidden input so the form still submits something. Each dropdown library writes that list again, and each one can get part of it wrong.

Chrome 135 and Safari 27 let you style the real element instead:

```html
<label for="status">Status</label>
<select id="status" name="status">
	<button>
		<selectedcontent></selectedcontent>
	</button>
	<option value="todo">
		<span class="dot" aria-hidden="true"></span>
		<span class="label">To do</span>
		<span class="hint">Not started yet</span>
	</option>
	<option value="progress">
		<span class="dot" aria-hidden="true"></span>
		<span class="label">In progress</span>
		<span class="hint">Someone is on it</span>
	</option>
	<!-- … -->
</select>
```

```css
select,
::picker(select) {
	appearance: base-select;
}
```

The browser keeps everything a select already does: keyboard support, focus, the `change` event, validation, and form submission. You style what it displays.

Firefox does not support it yet and shows a regular select. I cover that case in the [support section](#browser-support-and-fallback).

## Opt in on the select and its picker

`appearance: base-select` is the switch. Without it, a select looks and works the way it always has.

The declaration goes in two places. `select` covers the closed state. `::picker(select)` is a new pseudo-element for the list that opens, and it needs its own opt-in. That second opt-in only works when the select has opted in too.

Try each combination, and open the select every time:

	

With nothing, you get the operating system's select. It only shows the text of each option, so the dot disappears and the label and hint share one line.

With the select alone, the closed box switches to the new rendering and shows the dot. The list is still drawn by the operating system.

With both, the browser replaces that list with a popover inside the page. It renders the content of each option and puts a checkmark next to the selected one. The default styles are plain on purpose, so they are easy to override.

The switch changes a few behaviors too. The picker opens in the top layer, like any popover, so a parent with `overflow: hidden` cannot clip it and you do not need a `z-index`. It can no longer extend outside the browser window, which a native list sometimes does. The select also stops sizing itself to its longest option, so give it a width. On phones, people get the in-page picker instead of the system sheet or wheel.

## Rich content in options

The HTML parser used to drop every tag inside a `<select>` apart from a few, like `<option>` and `<optgroup>`, and keep only the text inside them. Browsers that support customizable select now keep that markup in the DOM, and `base-select` renders it. A `<span>`, an `<img>`, or an inline `<svg>` can go inside an option.

Three rules come with that.

Keep the content non-interactive. The option is already the interactive element, so a link or a button inside it will not work as expected, and screen readers will not announce it.

Hide decoration from assistive technology. The dot has `aria-hidden="true"` because the label already says the status.

Always set `value`. Without it, the select uses the option's text as its value, and that text now includes the hint. An option without `value` in this example would submit `In progress Someone is on it`.

## Control the closed state with selectedcontent

The select's first child can be a `<button>`. The browser uses it as the closed part of the select. Inside it, `<selectedcontent>` displays a copy of the selected option. The browser clones the option's content into it and replaces the clone each time the selection changes.

That button is not a separate control. Focus stays on the select, and the content inside the button is inert.

Because the closed state is a copy, you can style it apart from the list. Here, the hint is useful while choosing but noisy once the field is closed:

```css
selectedcontent .hint {
	display: none;
}
```

	

Without the button, the closed select shows the option text and no dot. With `<selectedcontent>`, it shows the full copy, hint included. The last version hides the hint in the copy only, and the options in the list keep theirs.

There is one catch. The browser updates the copy when the selection changes, and only then. If JavaScript edits the selected option afterward, for example to translate a label, the closed select keeps the old content until someone picks another option. MDN also warns that some frameworks block these features or fail to hydrate them during server-side rendering, so test the select in your stack.

## Style every part

Here are the parts you can target:

A few states complete the list. `option:checked`, `option:hover`, and `option:focus-visible` work as you would expect. `:open` is new: it matches the select while its picker is showing.

Here is the CSS for the finished status field:

```css
@supports (appearance: base-select) {
	select,
	::picker(select) {
		appearance: base-select;
	}

	select {
		inline-size: 16rem;
		padding: 0.5rem 0.75rem;
		border: 2px solid #222;
		border-radius: 0.5rem;
		background: white;
		font: inherit;
	}

	select::picker-icon {
		color: deeppink;
	}

	selectedcontent {
		display: flex;
		align-items: center;
		gap: 0.6rem;
	}

	selectedcontent .hint {
		display: none;
	}

	::picker(select) {
		margin-block: 0.4rem;
		padding: 0.3rem;
		border: 2px solid #222;
		border-radius: 0.5rem;
		box-shadow: 0 0.75rem 1.5rem rgb(0 0 0 / 0.18);
	}

	option {
		display: grid;
		grid-template-columns: auto 1fr auto;
		grid-template-areas:
			'dot label check'
			'.   hint  check';
		align-items: center;
		align-content: center;
		column-gap: 0.6rem;
		padding: 0.5rem 0.6rem;
		border-radius: 0.35rem;
	}

	option .dot {
		grid-area: dot;
	}

	option .label {
		grid-area: label;
	}

	option .hint {
		grid-area: hint;
	}

	option::checkmark {
		grid-area: check;
		color: deeppink;
	}

	option:hover,
	option:focus-visible {
		background: #ffe8f3;
	}

	option:checked .label {
		font-weight: 700;
	}
}
```

The `option` rule does most of the work. Each option becomes a grid, the hint goes under the label, and the checkmark moves to the end of the row. `::checkmark` is a box the browser generates inside the option, so it is a grid item like the spans.

The selected option has two cues, the checkmark and the bold label. Color alone is not enough to show that state.

	

The line under the field comes from `FormData`. Pick a status and it shows the `value` the form would submit. The keyboard support comes from the browser too. I did not write any of it.

## Animate the picker

The picker behaves like a popover. It goes from `display: none` to the top layer when it opens, and back when it closes. The entry animation pattern for dialogs and popovers works on it:

- `@starting-style` sets the values the opening transition starts from.
- `allow-discrete` keeps `display` and `overlay` in place until the closing transition ends, so the picker can fade out before it disappears.

I explained this pattern in more detail in [the @starting-style article](/blog/starting-style-css/).

	

`:open` also rotates the arrow, through `select:open::picker-icon`.

Keep the motion short and put it inside `@media (prefers-reduced-motion: no-preference)`. People who ask their system for less motion then get the instant version, which the demo also does.

## Position the picker

The picker is at least as wide as the select and lines up with its start edge. Vertically, it opens on the side with the most room. The default styles include `position-try-order: most-block-size`, so a select in the lower half of the window opens upward even when the list would fit below. You may have seen that in the first demo.

That is [CSS anchor positioning](/blog/css-anchor-positioning-without-javascript/), with the select as the anchor, so the same properties change it. To open below whenever the list fits, and above only when it does not:

```css
::picker(select) {
	position-try-order: normal;
}
```

The browser now tries the default position first, below the select, and uses the fallbacks only when the picker would overflow.

## Browser support and fallback

On December 4, 2026, customizable select works in Chrome and Edge from version 135, Opera from version 120, and Safari 27 on macOS, iOS, and iPadOS. Can I Use reports 77.43% global support. Firefox has had `appearance: base-select` behind a preference since version 149, but it is not enabled by default. Mozilla's standards position on the feature is positive. MDN marks it as limited availability, so it is not Baseline yet.

Chrome and Safari also start from different default styles. Safari 27 shipped a new design with a drop shadow, 4px rounded corners, and taller rows, and WebKit took it to the CSS Working Group so every browser can share it. Until then, set the properties you care about instead of relying on the defaults.

In a browser without support, the select falls back to the regular one:

- The parser drops `<button>`, `<selectedcontent>`, and the spans. Each option keeps its text.
- `appearance: base-select` is ignored.
- A rule that contains `::picker(select)` in its selector list is dropped entirely, because one unknown selector invalidates the whole list. That is harmless for the opt-in rule, but keep shared select styles out of it.

The form still works. Users get the select they already know. Two details make that fallback better.

First, put the custom styles inside `@supports (appearance: base-select)`, as in the CSS above. Padding, borders, and colors designed for the new rendering can look wrong on a native select.

Second, read the option text without the markup. "In progress" and "Someone is on it" run together once the spans are gone. A visually hidden comma after the label fixes that, and screen readers in supporting browsers get the same pause:

```html
<option value="progress">
	<span class="dot" aria-hidden="true"></span>
	<span class="label">In progress</span><span class="sr-only">, </span>
	<span class="hint">Someone is on it</span>
</option>
```

The fallback now reads "In progress, Someone is on it". The demos in this article use this markup, which is why the "Nothing" version of the first demo shows a comma.

On phones, the in-page picker replaces the system one. That is fine for four statuses. For a long list where people expect the system wheel, you can limit the opt-in to precise pointers:

```css
@media (pointer: fine) {
	select,
	::picker(select) {
		appearance: base-select;
	}
}
```

## When you still need JavaScript

Customizable select covers one choice from a list. It does not replace every dropdown component.

It has no multiple-choice dropdown. Chromium browsers now apply `base-select` to the list box version too, with `multiple` or a `size` above 1, which renders in the page without a picker. A dropdown that accepts several choices, like a tag picker, is still not customizable.

It has no search. The picker has no text field to filter options, so a list of 200 countries with a filter is still a combobox.

It does not allow controls inside options. If each row needs its own action, such as an "Edit" link next to a saved address, you need a different pattern.

For a single choice, I would start with the real select now. Browsers without support get a working form field, and the others get the design without a dropdown library.

## References

- [MDN: Customizable select elements](https://developer.mozilla.org/en-US/docs/Learn_web_development/Extensions/Forms/Customizable_select)
- [MDN: Customizable select listboxes](https://developer.mozilla.org/en-US/docs/Learn_web_development/Extensions/Forms/Customizable_select_listboxes)
- [MDN: `<selectedcontent>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/selectedcontent)
- [MDN: `::picker()`](https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Selectors/::picker)
- [MDN: `::checkmark`](https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Selectors/::checkmark)
- [MDN: `::picker-icon`](https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Selectors/::picker-icon)
- [MDN: `:open`](https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Selectors/:open)
- [Chrome for Developers: The `<select>` element can now be customized with CSS](https://developer.chrome.com/blog/a-customizable-select)
- [WebKit: WebKit Features for Safari 27.0](https://webkit.org/blog/18325/webkit-features-for-safari-27-0/)
- [Open UI: Customizable Select Element explainer](https://open-ui.org/components/customizable-select.explainer/)
- [Can I Use: Customizable Select element](https://caniuse.com/customizable-select)
- [Mozilla standards position: Customizable select element](https://github.com/mozilla/standards-positions/issues/1060)
