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

ConditionBuilder

Component

Build condition groups from properties, operators, and values using AND and OR logic.

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

Live preview

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

100%

Segment Conditions

User Segment
Matchof the following
and

1 group(s), 2 condition(s)

ConditionBuilder

PropTypeDefaultDescription
groupsRequiredConditionGroup[]—조건 그룹 배열
onChangeRequired(groups: ConditionGroup[]) => void—그룹 변경 핸들러
propertiesstring[]—선택 가능한 속성 목록 (기본 10개 제공)
labelstring—빌더 레이블
nestedbooleanfalse중첩 AND/OR 그룹 활성화
maxDepthnumber3최대 중첩 깊이
conditionTypesRecord<string, ConditionTypeRenderer>—이질적 조건 타입 렌더러 레지스트리
onPreview(groups: ConditionGroup[]) => void—조건 변경 시 미리보기 콜백
previewCountnumber—매치 카운트 표시 (toLocaleString 포맷)
labelsConditionBuilderLabels—미리보기 문구 오버라이드 (previewSuffix, formatPreview). 기본은 영어 "matches"
addNestedGroupLabelstring"Add nested group"중첩 그룹 추가 버튼 텍스트
View test results

테스트 커버리지

2026년 7월 9일8/8 통과
8성공
0실패
8전체
  • 조건 그룹을 렌더링한다
  • label을 렌더링한다
  • Add group 버튼이 동작한다
  • Add condition 버튼이 동작한다
  • 같은 tick과 중첩 빌더에서 그룹과 조건을 연속 추가해도 고유한 id를 만든다
  • nested 모드에서 Add nested group 버튼이 표시된다
  • previewCount를 표시한다
  • conditionTypes 커스텀 렌더러를 적용한다

Related components

opt-ui

StepBuilder

Core

Add, remove, and reorder an ordered sequence of steps.

opt-ui

Form

Core

Build accessible forms with opt-ui-primitives Form APIs, field validation, specialized inputs, and shared form store hooks.

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.

PreviousStepBuilderNextPopover