Basic

<NativeSelect
  label="Choose a framework"
  data={['Davaux', 'Hono', 'Elysia', 'Fastify']}
/>

With option objects

<NativeSelect
  label="Country"
  data={[
    { value: 'us', label: 'United States' },
    { value: 'gb', label: 'United Kingdom' },
    { value: 'ca', label: 'Canada' },
    { value: 'au', label: 'Australia', disabled: true },
  ]}
/>

With description and error

Choose the plan that fits your needs.

Please select an option.

<NativeSelect
  label="Plan"
  description="Choose the plan that fits your needs."
  data={['Free', 'Pro', 'Enterprise']}
/>
<NativeSelect
  label="Required field"
  data={['Option A', 'Option B']}
  withAsterisk
  error="Please select an option."
/>

Sizes

<NativeSelect size="xs" data={['Option A', 'Option B']} />
<NativeSelect size="sm" data={['Option A', 'Option B']} />
<NativeSelect size="md" data={['Option A', 'Option B']} />

Props

PropTypeDefaultDescription
data(string|NativeSelectOption)[]Options rendered as <option> elements (required)
idstringAssociates label with select via HTML for/id
labelReactNodeLabel rendered above the select
descriptionReactNodeHelper text below the label
errorReactNode|booleanError message; pass true for styles only
requiredbooleanMarks field as required and adds asterisk
withAsteriskbooleanAdds asterisk without native required attribute
disabledbooleanDisables the select
size'xs'|'sm'|'md'|'lg'|'xl'Font size and height via design tokens
radius'xs'|'sm'|'md'|'lg'|'xl'|stringBorder-radius of the select
valuestringPre-selects the matching option (SSR snapshot)
namestringForm field name
classstringAdditional CSS class names
styleobjectInline styles