p-checkbox-3

PreviousNext

Checkbox with description

Docs
cossblock

Preview

Loading preview…
registry/default/particles/p-checkbox-3.tsx
import * as React from "react";

import { Checkbox } from "@/registry/default/ui/checkbox";
import { Label } from "@/registry/default/ui/label";

export default function Particle() {
  const id = React.useId();

  return (
    <div className="flex items-start gap-2">
      <Checkbox defaultChecked id={id} />
      <div className="flex flex-col gap-1">
        <Label htmlFor={id}>Accept terms and conditions</Label>
        <p className="text-muted-foreground text-xs">
          By clicking this checkbox, you agree to the terms and conditions.
        </p>
      </div>
    </div>
  );
}

Installation

npx shadcn@latest add @coss/p-checkbox-3

Usage

import { PCheckbox3 } from "@/components/p-checkbox-3"
<PCheckbox3 />