Skip to Content
DocsResourcesPricingShowcase

Select (Native)

Used to pick a value from predefined options.

SourceStorybookRecipe

import { NativeSelect } from '@saas-ui/react/native-select'
<NativeSelect.Root>
  <NativeSelect.Field>
    <option value="1">Option 1</option>
    <option value="2">Option 2</option>
  </NativeSelect.Field>
</NativeSelect.Root>

Use the size prop to change the size of the select component.

Use the variant prop to change the appearance of the select component.

Pass the items prop to the NativeSelectField component to render a list of options.

Use the value and onChange props to control the select component.

Here is an example of how to use the NativeSelect component with react-hook-form.

PropDefaultType
colorPalette 'gray'
'gray' | 'red' | 'orange' | 'yellow' | 'green' | 'teal' | 'blue' | 'cyan' | 'purple' | 'pink' | 'accent'

The color palette of the component

variant 'outline'
'outline' | 'filled' | 'plain'

The variant of the component

size 'md'
'lg' | 'md' | 'sm' | 'xs'

The size of the component

as
React.ElementType

The underlying element to render.

asChild
boolean

Use the provided child element as the default rendered element, combining their props and behavior.

For more details, read our Composition guide.
unstyled
boolean

Whether to remove the component's style.

Previous

Segmented Control

Next

Select