Search documentation

Search components and pages

Native Select

A styled native HTML select element.

01

Installation

Add the native select component with the shadcn CLI.

bash
npx shadcn@latest add https://swiss.ui.unsanity.ai/r/native-select.json
02

Usage

tsx
import { NativeSelect } from "@/components/ui/native-select"
03

Examples

Default

import { NativeSelect, NativeSelectOption } from "@/components/ui/native-select"

<NativeSelect defaultValue="next">
  <NativeSelectOption value="next">Next.js</NativeSelectOption>
  <NativeSelectOption value="remix">Remix</NativeSelectOption>
  <NativeSelectOption value="astro">Astro</NativeSelectOption>
</NativeSelect>