Checkbox Group

Form

A group component that manages multiple checkboxes with shared state and validation. Perfect for multi-select forms and preference settings.

Installation

bash
1npx @dinachi/cli@latest add checkbox-group

Run the CLI command above to automatically install the component and its dependencies.

Examples

Default Checkbox Group

A basic checkbox group with multiple options

Controlled Checkbox Group

Checkbox group with controlled state and live value display

Selected: react

Horizontal Checkbox Group

Checkbox group with horizontal layout

Disabled Checkbox Group

Checkbox group in disabled state

API Reference

PropTypeDefaultDescription
value
string[]The currently selected values
defaultValue
string[][]The default selected values
onValueChange
(value: string[]) => voidCallback fired when the selected values change
disabled
booleanfalseWhether the checkbox group is disabled
required
booleanfalseWhether at least one checkbox must be selected