Skip to content
RefineUI

Field

Form field container wrapping label, control, error, and helper text.

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"Field size tier (affects label and messages).

Label element for the field. Accepts size prop (defaults from Field context).

Visual required indicator (asterisk).

Helper text below the input.

Error message below the input.