Componentform0.85 KB gzipZero dependencies
Checkbox Group
Checkbox options with a select-all row (indeterminate state), animated check fills, and staggered entrance.
Preview
Live Preview
Installation
Tokens guide →Add to your project via CLI (zero dependencies, code you own):
npx bigbullui add checkbox-groupOr install the full npm package:
npm install bigbulluiUsage
tsx3 lines
import { CheckboxGroup } from "@/components/ui/checkbox-group"; <CheckboxGroup options={options} value={value} onValueChange={setValue} />Source code
checkbox-group.tsx + 1 helperZero third-party dependencies (2 local files shown in tabs below).
tsxcheckbox-group.tsx117 lines
"use client"; import * as React from "react";import { cn } from "./lib/utils"; export type CheckboxGroupOption = { value: string; label: string; disabled?: boolean;}; export type CheckboxGroupProps = { value?: string[]; defaultValue?: string[]; onValueChange?: (value: string[]) => void; options: CheckboxGroupOption[]; className?: string;};Props
| Prop | Type | Description |
|---|---|---|
| value | string[] | Controlled selected values. |
| defaultValue | string[] | Uncontrolled initial values. |
| onValueChange | (value: string[]) => void | Change handler. |
| options | CheckboxGroupOption[] | Available options. |
| className | string | Optional Tailwind or custom CSS classes merged with component styles. |