Zazz Design Framework
Components

Select

A native select restyled with the customizable select API.

The .select restyles a native <select> using appearance: base-select, so the dropdown picker matches the rest of the system where supported. Falls back to the native control otherwise (gated behind @supports).

The base-select pattern requires a <button><selectedcontent></selectedcontent></button> as the select's first child — the button is the trigger and <selectedcontent> mirrors the chosen option. Keep the <option>s (an <optgroup> label works as a native fallback) after it.

Default

Loading components…

Placement

Set data-side and data-align on the .select to place the picker. data-side picks which edge of the trigger it opens against (defaults to bottom); data-align picks which trigger edge the panel aligns to — and, when the options are wider than the trigger, which way it grows (defaults to start). This mirrors the dropdown attributes, and is gated behind @supports (anchor positioning), so browsers without it keep the native picker placement. The picker also flips to the opposite side when there isn't room.

Sides

Loading components…

Alignment

Loading components…

API

AttributeWhereValues
data-side.selecttop, bottom, left, right
data-align.selectstart, center, end

On this page