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

    770
  • Calendar with time pressets

    Calendar with time pressets

    504
  • Sidebar

    Sidebar

    339
  • Sonner

    Sonner

    231
  • Chart

    Chart

    215
  • Icons

    Icons

    176
  • Dropdown Menu

    Dropdown Menu

    149
  • Calendar with event slots

    Calendar with event slots

    116

More in Forms

View all
  • Premium Auth

    Premium Auth

    496
  • Login 2

    Login 2

    7
  • Authentication Card

    Authentication Card

    45
  • Login 1

    Login 1

    52
  • Form

    Form

    136
  • Contact Card

    Contact Card

    1K
  • Form

    Form

    16
  • Card Studio

    Card Studio

    41