ikascom

Field

Forms

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&apos;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>
  );
}

Dependencies

More by ikascom

View all
  • Animated Number

    Animated Number

    17
  • Action Bar

    Action Bar

    5
  • Setting Row

    Setting Row

  • Collapse

    Collapse

  • Layout

    Layout

  • Launchpad Setup Checklist

    Launchpad Setup Checklist

More in Forms

View all
  • Form

    Form

    7
  • Login 2

    Login 2

    16
  • Contact Form

    Contact Form

    33
  • Contact Card

    Contact Card

    1.1K
  • Book A Demo 1

    Book A Demo 1

    95
  • Premium Auth

    Premium Auth

    614
  • Onboarding Stepper

    Onboarding Stepper

    13
  • Authentication Card

    Authentication Card

    52