reopt design
DocsExploreTemplatesCanvasToolsPricing
Login
opt-uiopt-chartsopt-datagridopt-editoropt-calendaropt-filemanageropt-chatopt-shellbrandapp-ui
Overview205Core74Shells99Blocks32
SegmentedControl
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.

SegmentedControl

Component

Show all options in a single-selection control with radio-group semantics and arrow-key navigation.

Related docs
bun add @reopt-ai/opt-ui
Install and import
bash
bun add @reopt-ai/opt-ui
tsx
import { SegmentedControl } from "@reopt-ai/opt-ui";

Live preview

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

100%

Catalog tabs

Sizes and full width

Disabled segment

Usage guidance

Best practices

  • Use when exactly one of a small number of options is selected, such as Events or Properties.

Usage to avoid

  • Use ToggleGroup when multiple options can be active at the same time.
  • Use Select for a larger number of options.

Usage examples

Keep the description in sync with the selected period

SegmentedControl

PropTypeDefaultDescription
optionsRequiredSegmentedControlOption<T>[]—세그먼트 목록 (value / label / icon / badge / disabled)
valueRequiredT—선택된 값
onChangeRequired(value: T) => void—선택 변경
size"sm" | "md""md"컨트롤 크기
fullWidthbooleanfalse컨테이너를 균등 분할
disabledbooleanfalse전체 비활성
aria-labelRequiredstring—radiogroup 이름. 필수
classNamestring—추가 CSS 클래스

컴포넌트 의존 관계

깊이
▲ USED BY (3)criteria-builderquery-output-panequery-result-chartSegmentedControl
View test results

테스트 커버리지

2026년 7월 9일

생성된 테스트 결과를 찾지 못했습니다.

SegmentedControl 항목이 문서 메타에 연결되어 있지만 현재 생성 파일에는 없습니다.

테스트를 추가한 뒤 `bun run generate:test-results`를 실행하거나 `testDescribe` 매핑을 다시 확인하세요.

Related components

opt-ui

FieldToken

Core

Display field types with consistent glyphs and optional labels for strings, numbers, dates, IP addresses, and geographic data.

opt-ui

Facet

Core

Filter by field values while reading their counts and distribution bars. Show top values first and collapse the long tail.

opt-ui

Expression

Core

Read and edit conditions as sentences for alert rules and segment filters that need to be easy to verify.

opt-ui

TextTruncate

Core

Measure text in its actual font and available width to truncate the start, middle, or both ends while preserving the full accessible text.

opt-ui

Highlight

Core

Mark matching search terms with semantic mark elements, matching longer terms first to avoid fragmented overlaps.

opt-ui

LiveRegion

Core

Announce live updates to screen readers with throttled summaries and alternating nodes that can repeat identical messages.

PreviousCopyButton