Velocity X Components

Forms

Native Select Field

Accessible grouped native select with a label, description, invalid state, and mobile device picker.

Subscription Included with the Velocity Components subscription.
bash
$ velocityx add standard-native-select-field

Built for astro.

Full docs for Native Select Field →

Needs a licence key — subscribe here, then velocityx loginonce.

astro v1.0.0
Native Select Field

Native selection keeps the device's familiar picker on mobile.

Props

NameTypeRequiredDefaultDescription
namestringYes
labelstringYes
optionsOption[]No[]
groupsGroup[]No[]
idstringNo`native-select-${globalThis.crypto?.randomUUID?.() ?? Math.random().toString(36).slice(2)}`
placeholderstringNo'Choose an option'
defaultValuestringNo''
descriptionstringNo
errorstringNo
requiredbooleanNofalse
disabledbooleanNofalse
classNamestringNo''

File this creates

The CLI writes this path into your project, relative to its root — nothing else moves.

text
components/velocity/standard-native-select-field/NativeSelectField.astro

Using the Native Select Field component

Install it with velocityx add standard-native-select-field. The CLI writes the source straight into your project — no runtime dependency, no registry lock-in, and it themes itself from the same primary-*/accent-* scale as the rest of the library.

More from Forms.