Preview

Installation

<> import.ts
import { Select } from "@/components/ui/select"

Code

<> component.tsx
import { Select } from "@/components/ui/select"

<Select />

API Reference

Select

Native select with label, placeholder and custom arrow.

<> import.ts
import { Select } from "@/components/ui/select"

Props

PropTypeDefaultDescription
label
stringField label when isLabel is true
placeholder
string"Select an option..."Disabled first option text
isLabel
booleanfalseShow label above select
className
string""Additional CSS classes
value
stringControlled value
onChange
(e: React.ChangeEvent<HTMLSelectElement>) => voidChange handler
disabled
booleanfalseDisable control
children
React.ReactNodeOption elements