Field · Overview

스토리북 개발자들을 위한 내부 문서

Components

Field

Overview

Field는 폼 컨트롤(Input · Select · Checkbox 등)과 레이블·설명·에러를 묶는 조합 컴포넌트입니다. Input과 패키지가 분리되어 있으며 @/components/field에서 import합니다. 레이아웃 prop은 없고, className과 children 순서로 배치합니다.

Composition

Field + FieldLabel + 컨트롤(+ Description / Error)을 children으로 조합합니다.

기본

회사 메일 주소를 입력하세요.

에러

FieldGroup

Parts

Field 패밀리 파츠입니다. 레이아웃은 className으로 자유 배치합니다.

  • FieldLabelhtmlFor로 컨트롤과 연결하는 레이블.
  • FieldDescription도움말·힌트 문구.
  • FieldError검증 실패 메시지(role=alert).
  • FieldGroup여러 Field를 묶는 컨테이너.

FieldLabel

FieldDescription

도움말 문구입니다.

FieldError

FieldGroup