Components
Field
Accessible form field container pairing labels, descriptions, and spring-animated validation errors with controls.
Your team will access projects at taut.app/taut-studio.
import {
Field,
FieldDescription,
FieldLabel,
} from "@/components/ui/field";
import { Input } from "@/components/ui/input";
export default function Particle() {
return (
<Field>
<FieldLabel>Workspace URL</FieldLabel>
<Input placeholder="taut-studio" />
<FieldDescription>
Your team will access projects at taut.app/taut-studio.
</FieldDescription>
</Field>
);
}
Installation
pnpm dlx shadcn@latest add @taut-ui/field
Usage
import {
Field,
FieldDescription,
FieldError,
FieldLabel,
} from "@/components/ui/field"
import { Input } from "@/components/ui/input"<Field name="email">
<FieldLabel>Email</FieldLabel>
<Input required type="email" />
<FieldDescription>We will never share your email.</FieldDescription>
<FieldError />
</Field>Examples
Validation Error
Use your company email address.
Please enter a valid email address.
import {
Field,
FieldDescription,
FieldError,
FieldLabel,
} from "@/components/ui/field";
import { Input } from "@/components/ui/input";
export default function Particle() {
return (
<Field invalid>
<FieldLabel>Work email</FieldLabel>
<Input defaultValue="lucas@invalid" type="email" />
<FieldDescription>Use your company email address.</FieldDescription>
<FieldError match>Please enter a valid email address.</FieldError>
</Field>
);
}
Disabled
Managed automatically by your workspace administrator.
import {
Field,
FieldDescription,
FieldLabel,
} from "@/components/ui/field";
import { Input } from "@/components/ui/input";
export default function Particle() {
return (
<Field disabled>
<FieldLabel>Organization ID</FieldLabel>
<Input defaultValue="org_01J8K9M2N4P6" />
<FieldDescription>
Managed automatically by your workspace administrator.
</FieldDescription>
</Field>
);
}
With Checkbox
Receive a weekly summary when new components ship.
import { Checkbox } from "@/components/ui/checkbox";
import {
Field,
FieldDescription,
FieldLabel,
} from "@/components/ui/field";
export default function Particle() {
return (
<Field>
<FieldLabel>
<Checkbox defaultChecked />
Send release notes
</FieldLabel>
<FieldDescription>
Receive a weekly summary when new components ship.
</FieldDescription>
</Field>
);
}
API Reference
Field
Wraps Base UI Field.Root. Connects label, description, error, and control IDs automatically.
| Prop | Type | Default | Description |
|---|---|---|---|
name | string | - | Field identifier used for Form error mapping |
disabled | boolean | false | Disables the field and all descendant controls |
invalid | boolean | false | Forces invalid visual styling across child slots |
validate | (value: unknown) => string | string[] | null | - | Custom validation function |
FieldLabel / FieldDescription / FieldError / FieldItem / FieldControl / FieldValidity
Composable primitives from @base-ui/react/field. FieldDescription automatically hides when a FieldError is active.