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
Open ↗

Installation

Tokens guide →

Add to your project via CLI (zero dependencies, code you own):

npx bigbullui add checkbox-group

Or install the full npm package:

npm install bigbullui

Usage

tsx3 lines
import { CheckboxGroup } from "@/components/ui/checkbox-group"; <CheckboxGroup options={options} value={value} onValueChange={setValue} />

Source code

checkbox-group.tsx + 1 helper

Zero 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

PropTypeDescription
valuestring[]Controlled selected values.
defaultValuestring[]Uncontrolled initial values.
onValueChange(value: string[]) => voidChange handler.
optionsCheckboxGroupOption[]Available options.
classNamestringOptional Tailwind or custom CSS classes merged with component styles.