About
A set of layout primitives for building form fields with a label, description, error message and grouping around any input control.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Field to your project and fits it to your theme.
Code
How Field is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
import {
Field,
FieldLabel,
FieldDescription,
FieldError,
FieldGroup,
} from "@/components/ui/field";
import { Input } from "@/components/ui/field-utils/input";
export default function FieldDemo() {
return (
<div className="w-full max-w-sm p-6">
<FieldGroup>
<Field>
<FieldLabel htmlFor="field-demo-email">Email</FieldLabel>
<Input
id="field-demo-email"
type="email"
placeholder="you@example.com"
/>
<FieldDescription>
We'll never share your email.
</FieldDescription>
</Field>
<Field data-invalid>
<FieldLabel htmlFor="field-demo-password">Password</FieldLabel>
<Input
id="field-demo-password"
type="password"
aria-invalid
defaultValue="secret"
/>
<FieldError
errors={[{ message: "Password must be at least 8 characters." }]}
/>
</Field>
</FieldGroup>
</div>
);
}














