Native Select
Native HTML select styled to match Input and the glass form controls, without becoming a custom dropdown.
Used to localize billing and tax settings.
NativeSelect is a native <select> with glass-ui form styling. It keeps the browser and OS picker behavior on purpose, so this component should be used when you want native accessibility and platform-consistent interaction instead of a fully custom dropdown.
Installation
npx @glass-ui-kit/cli add selectUsage
Examples
Canonical Field Composition
Use Field, Label, and FieldDescription when the select belongs to one logical form field.
Used to localize billing and tax settings.
Groups
Use NativeGroup to organize longer native option lists without leaving the native picker behavior.
Error
Glass UI selects do not use an error prop. Set aria-invalid="true" directly, or set invalid on the surrounding Field when you want the field to propagate it.
Please choose a department.
Disabled
The disabled state is fully native and keeps the same opacity behavior as the rest of the form controls.
Styling
NativeSelect follows the same prop-first direction as Input and Textarea, but it keeps native select semantics first. Reach for variant and uiSize before custom classes, then use className as an escape hatch. When used inside Field, the actual <select> receives the generated id and merged descriptions even though it renders inside a wrapper div.
API Reference
| Prop | Type |
|---|---|
variant | "default" | "soft" | "strong" | "transparent" |
uiSize | "sm" | "md" | "lg" |
className | string |
NativeSelect also accepts the full native <select> API, including multiple, size, name, value, and onChange. NativeGroup and NativeOption stay thin wrappers around <optgroup> and <option>.