Checkbox

PreviousNext

A control that allows the user to toggle between checked and not checked.

Docs
bunduicomponent

Preview

Loading preview…
examples/components/checkbox/01/page.tsx
"use client";

import { useId } from "react";

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

export default function Component() {
  const id = useId();

  return (
    <div className="flex items-center gap-2">
      <Checkbox id={id} />
      <Label htmlFor={id}>Accept terms and conditions</Label>
    </div>
  );
}

Installation

npx shadcn@latest add @bundui/checkbox

Usage

import { Checkbox } from "@/components/checkbox"
<Checkbox />