BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/formscn/checkbox

checkbox

formscn/checkbox
FreeComponent

Checkbox component

Install it

npx shadcn@latest add https://formscn.space/r/checkbox.json

Source

src/components/ui/checkbox.tsxformscn.space/r/checkbox.json
1import { Checkbox as CheckboxPrimitive } from "@base-ui/react/checkbox";
2import { CheckIcon } from "lucide-react";
3
4import { cn } from "@/lib/utils";
5
6function Checkbox({ className, ...props }: CheckboxPrimitive.Root.Props) {
7 return (
8 <CheckboxPrimitive.Root
9 data-slot="checkbox"
10 className={cn(
11 "border-input dark:bg-input/30 data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary data-checked:border-primary aria-invalid:aria-checked:border-primary aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 flex size-4 items-center justify-center rounded-none border transition-colors group-has-disabled/field:opacity-50 focus-visible:ring-1 aria-invalid:ring-1 peer relative shrink-0 outline-none after:absolute after:-inset-x-3 after:-inset-y-2 disabled:cursor-not-allowed disabled:opacity-50",
12 className,
13 )}
14 {...props}
15 >
16 <CheckboxPrimitive.Indicator
17 data-slot="checkbox-indicator"
18 className="[&>svg]:size-3.5 grid place-content-center text-current transition-none"
19 >
20 <CheckIcon />
21 </CheckboxPrimitive.Indicator>
22 </CheckboxPrimitive.Root>
23 );
24}
25
26export { Checkbox };

What it pulls in

npm packages

  • @radix-ui/react-checkbox

Files it writes

  • src/components/ui/checkbox.tsx

Facts

Registry
formscn
Type
registry:ui
Access
Free
Files written
1
Licence
the repository states none
First indexed
2026-08-01
Last confirmed
yesterday

Go to the source

formscn.space AbdullahMukadam/formscn on GitHub Raw registry item This item as JSON

More from formscn

All 30 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
buttonbuttonformscnComponentsFree2 deps
calendarcalendarformscnComponentsFree2 deps
cardcardformscnComponentsFreeno deps
fieldfieldformscnComponentsFreeno deps
inputinputformscnComponentsFree1 dep
labellabelformscnComponentsFree2 deps
phone-inputphone-inputformscnComponentsFree2 deps
popoverpopoverformscnComponentsFree1 dep
BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex