# react.form.checkbox-group
A question answered by ticking any number of checkboxes - "Which types of
waste do you transport? Select all that apply" - inside a fieldset whose
legend asks it. It is the GOV.UK Design System checkboxes component: item
hints, an "or" divider and an exclusive "None of these" option included.
`toggleValue` is the list arithmetic behind every click, a pure function you
can also use on the server.
```tsx
"use client";
import { CheckboxGroup } from "#fune/react.form.checkbox-group@^1";
```
- **onChange** is called with every ticked value after each change, not with
the event, and always in the options' order, whatever order they were
ticked in. With **values** it is a controlled group; with **defaultValues**
(or neither) the component keeps the list itself and still reports it.
- **onBlur** is called, with nothing, when any box in the group loses focus,
so a form can mark the question touched (`form.state`'s blur action).
- **toggleValue(options, values, value, checked)** is that update. The result
holds only the options' values, once each, in their order, so a stale value
from an old option list drops out. Ticking an `exclusive` option clears the
others and ticking another clears it, which is what GOV.UK's
`data-behaviour="exclusive"` does in the browser; the input carries that
attribute too. A value that is not an option is refused.
- **Ids.** The first checkbox's id is the `id`, the rest `-2`, `-3`...
as GOV.UK does, so an error summary linking to `#` lands on the first
box. Every box posts under **name** (the id when left out). An item hint is
`-item-hint` and describes only its box.
- **The group's hint and error** are `-hint` and `-error`, as on
GOV.UK; the `