Field

Label, control, description and error composed into one accessible block.

Installation

This component is primitive-agnostic — same source under both flavors.

Basic

Inspect

We only use it to send your ticket.

Field connects the description and error to the control through aria-describedby, so a screen reader reads them on focus. The label stays visible and associated with the input, even when the placeholder changes.

Validation

Inspect

Set data-invalid on the Field for the label and aria-invalid on the control for the field itself. FieldError accepts a plain message, a list of messages from a form library or Standard Schema validator, or both — children win.

Textarea

Inspect

Optional. The team reads every note.

Group and fieldset

Inspect
Workspace

The address your team signs in with.

Notifications
Email

Horizontal

Inspect

Used by the CLI and integrations.

orientation="responsive" keeps the stacked layout until the surrounding FieldGroup is wide enough, then switches to a row without a viewport breakpoint.

API Reference — Field

PropTypeDefaultDescription
orientation"vertical" | "horizontal" | "responsive""vertical"Stack the label above the control, put them side by side, or switch to side by side once the surrounding FieldGroup is wide enough.
data-invalidboolean—Turns the field's label red. The control still carries its own aria-invalid.
aria-label / aria-labelledbystring—Names the field as a group. Only applied when one is supplied, so a single label/control field is not announced as an unnamed group.
classNamestring—Styles the field block.

Parts

PropTypeDefaultDescription
FieldGroupdiv—Stacks fields 12px apart and establishes the @container/field-group scope.
FieldSetfieldset—Semantic group of fields; stacks them 12px apart without a browser border.
FieldLegendvariant="legend" | "label"—Titles a fieldset. label matches FieldLabel for a nested fieldset.
FieldContentdiv—The label/description column beside a control in horizontal layouts.
FieldLabellabel—Associates text with its control via htmlFor. Wrapping a whole Field turns it into a bordered choice card.
FieldTitlediv—A title styled like a label but tied to no control.
FieldDescriptionp—Helper text. Field links its id into the control's aria-describedby.
FieldSeparatordiv—A rule with optional centered text; pass the surface background on cards.
FieldErrordiv—Error text or a list from errors. Children win when both are supplied; duplicates collapse.