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.
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.
| Prop | Type | Default | Description |
|---|---|---|---|
type | string | "text" | Input type |
className | string | - | Additional CSS classes. |
readOnly | boolean | false | When set to true, the input is read-only. |
disabled | boolean | false | When set to true, the input is disabled. |
aria-invalid | boolean | false | When set to true, the input is invalid. |