Field/field-toggles-

PreviousNext

A field/field-toggles- example

Docs
shadcnblocksblock

Preview

Loading preview…
code/example/field/field-toggles-1.tsx
import { Checkbox } from "@/components/ui/checkbox";
import { Field, FieldLabel } from "@/components/ui/field";

export const title = "Simple Checkbox";

const Example = () => (
  <div className="w-full max-w-md">
    <Field orientation="horizontal">
      <Checkbox id="terms" />
      <FieldLabel className="font-normal" htmlFor="terms">
        I agree to the terms and conditions
      </FieldLabel>
    </Field>
  </div>
);

export default Example;

Installation

npx shadcn@latest add @shadcnblocks/field-field-toggles-1

Usage

import { FieldFieldToggles1 } from "@/components/field-field-toggles-1"
<FieldFieldToggles1 />