Volt UI
ComponentsField

Field Input

A input field component for the Field component.

Basic Usage

The Field component provides a complete form field structure with label, description, and error handling.

We'll never share your email with anyone else.

import { Field, FieldLabel, FieldDescription, FieldInput } from "@epilot/volt-ui"

<FieldSet className="flex flex-col w-96">
  <FieldGroup>
    <Field variant="highlight">
      <div className="flex items-center gap-2">
        <FieldLabel>Email address</FieldLabel>
        <FieldLabelContent>...</FieldLabelContent>
      </div>
      <FieldInput type="email" placeholder="tim@apple.com" />
      <FieldDescription>We'll never share your email with anyone else.</FieldDescription>
    </Field>
  </FieldGroup>
  <FieldGroup>
    <Field variant="destructive">
      <div className="flex items-center gap-2">
        <FieldLabel>Password</FieldLabel>
        <FieldLabelContent>...</FieldLabelContent>
      </div>
      <FieldInput type="password" placeholder="********" />
      <FieldError>Password is required</FieldError>
    </Field>
  </FieldGroup>
</FieldSet>

Field Addons

Use FieldInputGroup and FieldGroupAddon to create input fields with addons (like icons or buttons) on either side.

https://
$
import { Field, FieldLabel, FieldInputGroup, FieldGroupAddon, FieldInput } from "@epilot/volt-ui"

<FieldGroup>
  <Field variant="highlight">
    <FieldLabel>Website</FieldLabel>
    <FieldInputGroup>
      <FieldGroupAddon align="start">https://</FieldGroupAddon>
      <FieldInput type="text" placeholder="example.com" />
    </FieldInputGroup>
  </Field>

  <Field variant="highlight">
    <FieldLabel>Price</FieldLabel>
    <FieldInputGroup>
      <FieldGroupAddon align="start">$</FieldGroupAddon>
      <FieldInput placeholder="10.00" />
    </FieldInputGroup>
  </Field>
</FieldGroup>

API Reference

FieldInput

Input component that integrates with Field context. Accepts all standard input props.

PropTypeDefaultDescription
typestring"text"Input type
classNamestring-Additional CSS classes.
readOnlybooleanfalseWhen set to true, the input is read-only.
disabledbooleanfalseWhen set to true, the input is disabled.
aria-invalidbooleanfalseWhen set to true, the input is invalid.