A group of checkboxes for multi-selection with horizontal or vertical layout.
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
- motion
Code
"use client";
import * as React from "react";
import { CheckboxGroup } from "@/registry/ruixenui/checkbox-group";
export default function CheckboxGroupDemo() {
const [selected, setSelected] = React.useState<string[]>(["react"]);
const frameworks = [
{
value: "react",
label: "React",
description: "A JavaScript library for building user interfaces",
},
{
value: "nextjs",
label: "Next.js",
description: "The React framework for production",
},
{
value: "astro",
label: "Astro",
description: "Build faster websites with less JavaScript",
},
{
value: "remix",
label: "Remix",
description: "Full stack web framework",
disabled: true,
},
];
return (
<div className="flex min-h-[450px] w-full items-center justify-center">
<div className="flex flex-col gap-6">
<CheckboxGroup
label="Select your frameworks"
options={frameworks}
value={selected}
onValueChange={setSelected}
/>
<CheckboxGroup
label="Horizontal layout"
options={[
{ value: "small", label: "Small" },
{ value: "medium", label: "Medium" },
{ value: "large", label: "Large" },
]}
orientation="horizontal"
/>
</div>
</div>
);
}
































