본문으로 건너뛰기
zest/ui

컴포넌트

Select

단일 선택.

설치

shadcn CLI 로 소스를 프로젝트에 가져와요. 테마·유틸·의존 부품이 함께 설치돼요.

npx shadcn@latest add @zest/select

패키지로 쓰려면 @zest-im/ui 에서 가져와요. 설치 안내

사용법

import { Select } from '@/components/ui/select'

위 미리보기의 「코드」 탭이 실제로 동작하는 예제예요.

API

prop타입설명
value?string—
onValueChange(value: string) => void—
optionsSelectOption[]—
placeholder?string—
disabled?boolean—
size?"sm" | "md"—
id?string—
className?string—
aria-describedby?string—
aria-invalid?boolean—
aria-label?string—

표에 없는 HTML·Radix 속성은 그대로 전달돼요.

접근성

↓/Enter 로 열고, 닫히면 트리거로 포커스가 돌아온다.