Skip to content

Native Select

Styled native select element.

Installation

bun add @xerobi/ui
import { NativeSelect, NativeSelectOptGroup, NativeSelectOption } from "@xerobi/ui/native-select"

This component is client-side. In Astro, hydrate it with a client directive.

API reference

NativeSelect

PropTypeDescription
size"default" | "sm"

NativeSelectOptGroup

Also accepts every prop of <optgroup> element.

No props of its own.

NativeSelectOption

Also accepts every prop of <option> element.

No props of its own.

Styling hooks: [data-slot="native-select-wrapper"], [data-slot="native-select"], [data-slot="native-select-icon"], [data-slot="native-select-option"], [data-slot="native-select-optgroup"].

Search documentation

Search pages, components and blocks.