field

Field

Wraps one form control with its label, description and error, wires their ids and validates the value; most form controls join a Field placed around them.

States: Default, Invalid

Parts

PartFileDoes
FieldField.vueGroups a label, an input, a description and an error of one form field, and validates its input.
FieldContentFieldContent.vueGroups the label and description that sit beside the control of a field.
FieldDescriptionFieldDescription.vueGives help text for a field, such as what to enter.
FieldErrorFieldError.vueShows why the input of a field is invalid, from its own validation, from the server or from a form library.
FieldGroupFieldGroup.vueStacks several fields of a form together.
FieldLabelFieldLabel.vueLabels the input of a field.
FieldLegendFieldLegend.vueTitles a set of related fields.
FieldSeparatorFieldSeparator.vueSeparates fields of a form, optionally with a short text in between.
FieldSetFieldSet.vueGroups related fields under one legend.
FieldTitleFieldTitle.vueShows the title of a field next to its description.
FieldValidityFieldValidity.vueRenders from the validation state of a field, such as a custom message or a strength meter.

Anatomy

<FieldGroup>
  <FieldSet>
    <FieldLegend />
    <FieldDescription />
    <FieldGroup>
      <Field>
        <FieldLabel />
        <FieldError />
        <FieldContent>
          <FieldLabel />
          <FieldDescription />
        </FieldContent>
      </Field>
    </FieldGroup>
    <FieldLabel>
      <Field>
        <FieldContent>
          <FieldTitle />
          <FieldDescription />
        </FieldContent>
      </Field>
    </FieldLabel>
  </FieldSet>
  <FieldSeparator />
</FieldGroup>

Styling

PartRecipe
Fieldfield
FieldContentfield-content
FieldDescriptionfield-description
FieldErrorfield-error
FieldGroupfield-group
FieldLabelfield-label
FieldLegendfield-legend
FieldSeparatorfield-separator
FieldSeparatorfield-separator-content
FieldSetfield-set
FieldTitlefield-label

Install

Writes 13 files into components/ui/field/. For agents, npx @frontic/ui docs field prints this reference as markdown; the MCP server serves the same.

Installs with it
separator
npm packages
@vueuse/core
class-variance-authority
reka-ui

Built from

API reference

Field Field.vue

Groups a label, an input, a description and an error of one form field, and validates its input.

PropTypeDefault
namestring—
disabledbooleanfalse
requiredbooleanfalse
invalidboolean
dirtyboolean
touchedboolean
validateFieldValidateFn—
validationModeFieldValidationMode'onSubmit'
validationDebounceTimenumber—
asChildbooleanfalse
asAsTag | Component—
classClassValue—
orientationFieldOrientation'vertical'
SlotSlot props
default{ invalid: boolean; errors: string[]; }
Data attributeValues
data-horizontal—
data-orientation'vertical' | 'horizontal' | 'responsive'
Recipe fieldSets
base: field 3 properties

FieldContent FieldContent.vue

FieldDescription FieldDescription.vue

FieldError FieldError.vue

FieldGroup FieldGroup.vue

FieldLabel FieldLabel.vue

FieldLegend FieldLegend.vue

FieldSeparator FieldSeparator.vue

FieldSet FieldSet.vue

FieldTitle FieldTitle.vue

FieldValidity FieldValidity.vue

Example
State