1Sponsor

Checkbox Group

Checkbox group with min/max selection

Terminal

Installation

pnpm dlx shadcn@latest add https://termcn.dev/r/checkbox-group.json

Usage

import { CheckboxGroup } from "@/components/ui/checkbox-group";
<CheckboxGroup
  label="Select toppings"
  options={[
    { value: "cheese", label: "Extra Cheese" },
    { value: "pepperoni", label: "Pepperoni" },
    { value: "mushrooms", label: "Mushrooms" },
  ]}
  onChange={(values) => {}}
/>

API Reference

CheckboxGroup

PropTypeDefault
labelstringundefined
optionsCheckboxGroupOption[]required
valuestring[]undefined
onChange(values: string[]) => voidundefined
minnumberundefined
maxnumberundefined