Skip to content
Data Input

CheckboxGroup

Group of checkboxes for multi-select options.

CheckboxGroup

Group of checkboxes for multi-select options. Pass options as { value, label } pairs; selection is a string array via React Aria CheckboxGroup.

Examples

Default

Provide a group label and options. Selection starts empty unless you seed it.

Features
Demo.tsxtsx
import { CheckboxGroup } from '@var-ui/react';

<CheckboxGroup
  label="Features"
  options={[
    { value: 'analytics', label: 'Analytics' },
    { value: 'billing', label: 'Billing' },
  ]}
/>

Default values

Seed an uncontrolled group with defaultValue (string array). Use value + onChange when selection must stay controlled.

Features
Demo.tsxtsx
import { CheckboxGroup } from '@var-ui/react';

<CheckboxGroup
  label="Features"
  defaultValue={['analytics', 'billing']}
  options={[
    { value: 'analytics', label: 'Analytics' },
    { value: 'billing', label: 'Billing' },
    { value: 'support', label: 'Priority support' },
  ]}
/>

Props

Accessibility

Built on React Aria CheckboxGroup. The group label associates with the set of checkboxes; each option keeps its own label beside the control. Keyboard users can move between options and toggle with Space. Prefer a visible group label so the purpose of the set is clear.