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

DynamicFieldForm

Shell

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

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

Live preview

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

100%

동적 필드 추가/제거

DynamicFieldForm

PropTypeDefaultDescription
initialCountnumber1초기 필드 수
minFieldsnumber1최소 필드 수
maxFieldsnumber—최대 필드 수
fieldType"text" | "email" | "url" | "number""text"필드 입력 타입
validateField(value: string, index: number) => string | undefined—커스텀 필드 검증 함수
onSubmit(values: string[]) => void | Promise<void>—제출 핸들러
labelsDynamicFieldFormLabels—i18n용 라벨 오버라이드

컴포넌트 의존 관계

깊이
▼ USES (1)DynamicFieldFormform
View test results

테스트 커버리지

2026년 7월 9일11/11 통과
11성공
0실패
11전체
  • 폼을 렌더링한다
  • 초기 필드를 렌더링한다
  • 필드 추가 버튼을 렌더링한다
  • 필드를 추가한다
  • maxFields에 도달하면 추가 버튼을 비활성화한다
  • minFields 이하로 삭제를 비활성화한다
  • onFieldsChange 콜백을 호출한다
  • labels로 텍스트를 커스텀한다
  • 필드 삭제 후 인덱스가 재정렬된다
  • 삭제한 필드는 제출 값에서 제외된다
  • 필드에 값을 입력할 수 있다

Related components

opt-ui

Form

Core

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

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

FileUploadForm

Shells

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

opt-ui

KeyValueEditor

Shells

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

PreviousWizardFormNextFileUploadForm