import { Checkbox } from "@/components/ui/checkbox";
import { Label } from "@/components/ui/label";
export function CheckboxDemo() {
return (
<Label className="flex items-center gap-2 text-base">
<Checkbox />
Remember me
</Label>
);
}
Installation
npx shadcn@latest add @eo-n/checkbox
Usage
Import all parts and piece them together.
import { Checkbox } from "@components/ui/checkbox";
<Checkbox />
Examples
Disabled
import { Checkbox } from "@/components/ui/checkbox";
import { Label } from "@/components/ui/label";
export function CheckboxDisabled() {
return (
<Label className="flex items-center gap-2 text-base">
<Checkbox disabled />
<span className="peer-data-[disabled]:text-muted-foreground peer-data-[disabled]:cursor-not-allowed">
Accept terms and conditions
</span>
</Label>
);
}