shadcn

Field

Forms 1

About

Here is Field component

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,
  FieldContent,
  FieldDescription,
  FieldLabel,
} from "@/components/ui/field-1"
import { Switch } from "@/components/ui/switch"

export default function FieldSwitch() {
  return (
    <div className="w-full max-w-md">
      <Field orientation="horizontal">
        <FieldContent>
          <FieldLabel htmlFor="2fa">Multi-factor authentication</FieldLabel>
          <FieldDescription>
            Enable multi-factor authentication. If you do not have a two-factor
            device, you can use a one-time code sent to your email.
          </FieldDescription>
        </FieldContent>
        <Switch id="2fa" />
      </Field>
    </div>
  )
}

Dependencies

More by shadcn

View all
  • Navigation menu

    Navigation menu

    820
  • Calendar with time pressets

    Calendar with time pressets

    540
  • Sidebar

    Sidebar

    367
  • Sonner

    Sonner

    262
  • Chart

    Chart

    234
  • Icons

    Icons

    217
  • Dropdown Menu

    Dropdown Menu

    164
  • Calendar with event slots

    Calendar with event slots

    132

More in Forms

View all
  • Form

    Form

    7
  • Contact Form

    Contact Form

    32
  • Login 2

    Login 2

    16
  • Contact Card

    Contact Card

    1.1K
  • Book A Demo 1

    Book A Demo 1

    94
  • Paper Plane

    Paper Plane

    80
  • Premium Auth

    Premium Auth

    613
  • Authentication Card

    Authentication Card

    52