reopt design
DocsExploreTemplatesCanvasToolsPricing
Login
opt-uiopt-chartsopt-datagridopt-editoropt-calendaropt-filemanageropt-chatopt-shellbrandapp-ui
Overview205Core74Shells99Blocks32
Select
reopt designreopt design

A design system for the AI era

  • Docs
  • Pricing
  • Releases
  • About
  • Contact
  • Terms of Service
  • Privacy Policy

reopt Inc.Business registration no. 217-88-02453contact@reopt.ai

© 2026 reopt Inc. All rights reserved.

Select

Component

Build a dropdown selection with Root, Label, Trigger, Popover, and Item components.

input
Related docs
bun add @reopt-ai/opt-ui
Install and import
bash
bun add @reopt-ai/opt-ui
tsx
import { SelectRoot, SelectLabel, SelectTrigger, SelectPopover, SelectItem } from "@reopt-ai/opt-ui";

Live preview

Change the width and theme, then interact with the components.

100%

기본 사용

긴 표시 값과 고정된 아이콘 여백

여러 Select

다중 선택

선택됨: react, svelte

Usage guidance

Anatomy

  • Compose Label, Trigger, Popover, and Item inside SelectRoot.

Best practices

  • Keep each option value a stable key separate from its display label. Use an array in multiple mode.

Usage to avoid

  • Keep commands out of selection lists. Use DropdownMenu for commands.

Usage examples

Basic selection

SelectRoot

PropTypeDefaultDescription
valuestring | string[]—제어 모드: 현재 선택 값 (multiple이면 string[])
onValueChange(value: string | string[]) => void—제어 모드: 값 변경 핸들러
defaultValuestring | string[]—비제어 모드: 초기값
multipleboolean—다중 선택 허용 (값이 string[]이 됨)
namestring—폼 필드명. 선택값마다 hidden input을 렌더해 폼 전송 지원

SelectLabel

PropTypeDefaultDescription
childrenRequiredReactNode—레이블 텍스트

SelectTrigger

PropTypeDefaultDescription
displayValueReactNode—기본 말줄임과 펼침 아이콘을 유지하는 표시 값
placeholderstring—선택 값이 비어 있을 때 표시할 문구
minWidthnumber | string140최소 너비. 유동 레이아웃에서는 0 사용
childrenReactNode—전체 레이아웃을 교체하는 슬롯. 기본 값/아이콘 정렬은 displayValue 사용
classNamestring—기본 스타일 오버라이드

SelectPopover

PropTypeDefaultDescription
childrenRequiredReactNode—SelectItem 목록
sameWidthbooleantrue트리거와 같은 너비
gutternumber4트리거와의 간격 (px)
classNamestring—기본 스타일 오버라이드

SelectItem

PropTypeDefaultDescription
valueRequiredstring—옵션 값
childrenRequiredReactNode—옵션 레이블
classNamestring—기본 스타일 오버라이드

컴포넌트 의존 관계

깊이
▲ USED BY (7)status-selectbranch-selectfilter-barcomparison-selectorchat-inputquery-result-chartquery-filters-menuSelect
View test results

테스트 커버리지

2026년 7월 9일4/4 통과
4성공
0실패
4전체
  • 트리거를 렌더링한다
  • multiple 모드: 여러 옵션을 선택하고 listbox가 열린 채 유지된다
  • multiple 모드: 선택된 옵션을 다시 누르면 해제된다
  • name이 있으면 선택값마다 hidden input을 렌더링한다

키보드 동작

키동작
↑ ↓옵션 탐색
Enter / Space옵션 선택
Esc팝오버 닫기
문자 입력Typeahead 탐색

Related components

opt-ui

Combobox

Core

Build autocomplete search with an input, popover, items, groups, group labels, and an empty state.

opt-ui

Button

Core

Use accessible buttons with primary, secondary, ghost, and danger variants, three sizes, icons, loading, and aria-busy states.

opt-ui

Input

Core

Use a standalone text input with labels, errors, hints, and icons.

opt-ui

Switch

Core

Toggle a setting with three sizes and explicit accessible associations for labels and descriptions.

opt-ui

Textarea

Core

Enter multiline text with the same label, error, and hint API as Input.

opt-ui

Checkbox

Core

Use labeled checkboxes with descriptions, groups, and an indeterminate state synchronized to the DOM property.

PreviousTabsNextDialog