shadcn

Field

Forms 3

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,
  FieldGroup,
  FieldLabel,
  FieldSet,
  FieldTitle,
} from "@/components/ui/field-1"
import {
  RadioGroup,
  RadioGroupItem,
} from "@/components/ui/radio-group"

export default function FieldChoiceCard() {
  return (
    <div className="w-full max-w-md">
      <FieldGroup>
        <FieldSet>
          <FieldLabel htmlFor="compute-environment-p8w">
            Compute Environment
          </FieldLabel>
          <FieldDescription>
            Select the compute environment for your cluster.
          </FieldDescription>
          <RadioGroup defaultValue="kubernetes">
            <FieldLabel htmlFor="kubernetes-r2h">
              <Field orientation="horizontal">
                <FieldContent>
                  <FieldTitle>Kubernetes</FieldTitle>
                  <FieldDescription>
                    Run GPU workloads on a K8s configured cluster.
                  </FieldDescription>
                </FieldContent>
                <RadioGroupItem value="kubernetes" id="kubernetes-r2h" />
              </Field>
            </FieldLabel>
            <FieldLabel htmlFor="vm-z4k">
              <Field orientation="horizontal">
                <FieldContent>
                  <FieldTitle>Virtual Machine</FieldTitle>
                  <FieldDescription>
                    Access a VM configured cluster to run GPU workloads.
                  </FieldDescription>
                </FieldContent>
                <RadioGroupItem value="vm" id="vm-z4k" />
              </Field>
            </FieldLabel>
          </RadioGroup>
        </FieldSet>
      </FieldGroup>
    </div>
  )
}

Dependencies

More by shadcn

View all
  • Navigation menu

    Navigation menu

    768
  • Calendar with time pressets

    Calendar with time pressets

    503
  • Sidebar

    Sidebar

    339
  • Sonner

    Sonner

    229
  • Chart

    Chart

    212
  • Icons

    Icons

    176
  • Dropdown Menu

    Dropdown Menu

    148
  • Calendar with event slots

    Calendar with event slots

    115

More in Forms

View all
  • Premium Auth

    Premium Auth

    495
  • Authentication Card

    Authentication Card

    44
  • Login 1

    Login 1

    52
  • Login 2

    Login 2

    7
  • Form

    Form

    31
  • Card Studio

    Card Studio

    41
  • Login Card

    Login Card

    32
  • Form

    Form

    136