"use client";
/**
* Checkbox — themed replacement for the native ``.
*
* The native control is rendered visually hidden (sr-only) so screen
* readers and keyboard focus still work the way browsers expect, while
* we paint a small rounded box next to it that fills with the primary
* color when checked. Fully controlled — caller owns `checked` state.
*
* Usage:
*
*
*
*
*/
import { Check } from "lucide-react";
import { cn } from "@/lib/utils";
export function Checkbox({
checked,
onCheckedChange,
disabled,
className,
ariaLabel,
}: {
checked: boolean;
onCheckedChange: (next: boolean) => void;
disabled?: boolean;
className?: string;
ariaLabel?: string;
}) {
return (
onCheckedChange(e.target.checked)}
className="peer absolute inset-0 size-full appearance-none m-0 cursor-pointer disabled:cursor-not-allowed rounded-md"
/>
{checked ? (
) : null}
);
}