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

KeyValueEditor

Shell

Edit key-value pairs with dynamic rows, secret-value visibility, and validation.

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

Live preview

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

100%

기본 사용

=
=
=

비밀값 토글

=
=
=

Controlled + onChange

=
=
=
[
  {
    "id": "1",
    "key": "DATABASE_URL",
    "value": "postgres://localhost:5432/mydb"
  },
  {
    "id": "2",
    "key": "API_KEY",
    "value": "sk-1234567890",
    "isSecret": true
  },
  {
    "id": "3",
    "key": "NODE_ENV",
    "value": "production"
  }
]

최대 항목 제한 (3개)

=
=
=

읽기 전용

=
=
=

빈 상태

항목이 없습니다. 추가 버튼을 눌러주세요.

KeyValueEditor

PropTypeDefaultDescription
valueKeyValueEntry[]—현재 엔트리 (controlled 모드)
defaultValueKeyValueEntry[]—초기 엔트리 (uncontrolled 모드)
onChange(entries: KeyValueEntry[]) => void—엔트리 변경 핸들러
showSecretTogglebooleanfalse비밀값 표시/숨김 토글 버튼 활성화
maxEntriesnumber—최대 항목 수 제한
readOnlybooleanfalse읽기 전용 모드
labelsKeyValueEditorLabels—i18n 라벨 오버라이드
renderActions(entry: KeyValueEntry, index: number) => ReactNode—항목별 커스텀 액션 슬롯
validateKey(key: string, entries: KeyValueEntry[]) => string | undefined—키 유효성 검사 함수
View test results

테스트 커버리지

2026년 7월 9일7/7 통과
7성공
0실패
7전체
  • 엔트리를 렌더링한다
  • 빈 상태를 표시한다
  • 추가 버튼을 클릭하면 새 엔트리를 추가한다
  • 삭제 버튼을 클릭하면 엔트리를 제거한다
  • readOnly 모드에서 추가/삭제 버튼을 숨긴다
  • showSecretToggle을 렌더링한다
  • maxEntries에 도달하면 추가 버튼을 숨긴다

키보드 동작

키동작
Tab키/값 필드 간 이동

Related components

opt-ui

SettingsForm

Shells

Build settings forms from data with validation, radio buttons, and checkboxes.

opt-ui

AuthForm

Shells

Switch between sign-in and sign-up forms with email and password validation and a remember-me option.

opt-ui

WizardForm

Shells

Guide sequential input with field definitions, per-step validation, an associated progress indicator, and a review step.

opt-ui

DynamicFieldForm

Shells

Add and remove fields at runtime with count limits, individual validation, and dynamic store updates.

opt-ui

FileUploadForm

Shells

Select files with metadata, image previews, size limits, and description input.

opt-ui

EventMetaEditor

Shells

Edit event metadata and caller-owned sections in one form with a shared footer save action.

PreviousFailureListNextWorkflowCanvas