Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Shadcn Native Select for React and Tailwind

Styled native HTML select element.

Installation

bunx --bun shadcn@latest add https://kit.dev/r/native-select.json

Usage

import {
  NativeSelect,
  NativeSelectOption,
} from "@/components/ui/native-select";
<NativeSelect className="w-full max-w-48">
  <NativeSelectOption value="">Select an option</NativeSelectOption>
  <NativeSelectOption value="banana">Banana</NativeSelectOption>
  <NativeSelectOption value="apple">Apple</NativeSelectOption>
  <NativeSelectOption value="orange">Orange</NativeSelectOption>
  <NativeSelectOption value="pineapple">Pineapple</NativeSelectOption>
</NativeSelect>

Demos

Controlled

Disabled

Groups

Invalid

Size Lg

Size Md

Size Sm

With Field

API Reference

NativeSelect

div

PropType
AttributeType

NativeSelectOption

option

PropType
AttributeType

NativeSelectOptGroup

optgroup

PropType
AttributeType