value
Description
Optional. Defines the initially checked checkboxesUsage
value?: (string | number)[];
Example
// Static example: sets the initially checked checkboxes
const options = [
{ id: 1, label: "Option 1" },
{ id: 2, label: "Option 2" },
{ id: 3, label: "Option 3" },
{ id: 4, label: "Option 4" },
{ id: 5, label: "Option 5" }
];
function Example() {
return <CheckboxGroup options={options} value={[3, 4]} />;
}
Related article: Setting the checked checkboxes
Related sample: Checkbox Group