Base Pure CSS

Select

The fully native select in the field frame: placeholder, disabled options and dependent pickers like country → city.

Real scenarios

The component as it is used in a product — not a specimen grid.

Checkout address — the city follows the country

Switch the country and the city list swaps with it; the placeholder keeps the choice honest until one is picked.

Digits only — 5 in Türkiye.

A ticket bar, with a priority that must be chosen

The assignee is optional; the priority is not — leaving it empty shows the field error, and one option can be disabled for off-hours.

A ticket without a priority is invisible to the queue.

Important props

Important props
Prop Type Default What it does
options array [] ['value' => 'Label'] or a list of ['value' => …, 'label' => …]; an option may carry disabled.
placeholder string null The disabled first option shown while nothing is chosen.
label / hint / error string null The label/hint/error field frame — same as input.
size string md Size: sm · md · lg.

Snippet

<x-nx::select label="کشور" placeholder="انتخاب کنید"
    :options="['tr' => 'ترکیه', 'de' => 'آلمان', 'jp' => 'ژاپن']"
    wire:model.live="state.country" />

<x-nx::select label="شهر" :options="$cities" wire:model="state.city" />