콘텐츠로 이동
RefineUI

Field

레이블, 컨트롤, 에러, 도움말을 감싸는 폼 필드 컨테이너.

We'll never share your email

Overview

Machine-readable contract from Component Spec.

component: fieldexport: Fieldversion: 1attributes: data-refineui=field

Anatomy

Partdata-refineui
rootfield
errorfield-error
hintfield-hint

Variants

AxisValues
sizesm, md, lg

Accessibility

SlotElementRole
field-errordivalert

Layout

PropertyValue
directionlogical
rtltrue
npm install @refineui/react @refineui/tokens
import { Field, FieldLabel, FieldHint, FieldError, FieldRequired, Input } from "@refineui/react";
<Field size="md">
<FieldLabel>Email address</FieldLabel>
<Input type="email" placeholder="you@example.com" />
<FieldHint>We'll never share your email.</FieldHint>
</Field>
<Field size="lg">
<FieldLabel>Password <FieldRequired /></FieldLabel>
<Input type="password" error={hasError} />
{hasError && <FieldError>Password is required</FieldError>}
</Field>
PropDefaultTypeDescription
size"md""sm" | "md" | "lg"필드 크기 티어(레이블과 메시지에 영향).

필드의 레이블 요소. size prop을 받습니다(Field 컨텍스트에서 기본값).

필수 표시 시각 인디케이터(별표).

입력 아래 도움말 텍스트.

입력 아래 에러 메시지.