A checkbox whose check draws in, with indeterminate parents, groups and labels that share its hover.
Install
Add it to your project
Run this in a project set up for shadcn/ui. It writes the files and installs the npm packages.
First time: connect the Infinity UI registry
- Create a personal token on your Tokens page.
- Put it in
.env.localasINFINITYUI_TOKEN. - Add the registry to
components.json:
{
"registries": {
"@infinityui": {
"url": "https://infinityui.io/r/{name}.json",
"headers": {
"Authorization": "Bearer ${INFINITYUI_TOKEN}"
}
}
}
}Using Claude Code, Codex, Cursor, Lovable or v0? See CLI & MCP for a setup prompt.
npm packages it adds
- cn
- @base-ui/react
- @tabler/icons-react
Code
import { Checkbox } from "@/components/ui/checkbox"
export function CheckboxDemo() {
return (
<div className="flex flex-col gap-3">
<label className="flex items-center gap-3 text-sm">
<Checkbox />
Email me about product updates
</label>
<label className="flex items-center gap-3 text-sm">
<Checkbox defaultChecked />
Remember this device
</label>
<label className="flex max-w-sm items-start gap-3 text-sm">
<span className="flex h-5 items-center">
<Checkbox />
</span>
<span className="flex flex-col gap-0.5">
<span className="leading-5 font-medium">Mentions and replies</span>
<span className="text-muted-foreground">
We’ll only notify you about activity on your own posts.
</span>
</span>
</label>
</div>
)
}
































