Checkbox group
Several choices among options (Mantine's Checkbox.Group): a label, description and error around ray-checkbox elements; the value is the array of the checked ones. max caps how many; required asks for one.
In a form: required, one entry per value
max: up to three
Select all (indeterminate)
Sizes, colors and disabled
API
For AI agents: this API as Markdown, or every component in llms-full.txt.
<ray-checkbox-group> · RayCheckboxGroup
The group is the form control: one entry per checked value under name (like checkboxes sharing a name); the checkboxes inside lose their own name. It stops their change events and fires its own. role="group" named by its label.
| Property | Attribute | Type | Default | Description |
|---|---|---|---|---|
value | value (initial) | array | The checked values. The value attribute: "a,b". | |
name | name reflects | string | Form field name. | |
label | label | string | Group label (also its accessible name). | |
description | description | string | Help text. | |
error | error | string | Error text. | |
required | required reflects | boolean | At least one must be checked. | |
disabled | disabled reflects | boolean | Disables every checkbox. | |
max | max | number | At most this many: the others are disabled once reached; the label shows the count. | |
orientation | orientation reflects | vertical | horizontal | vertical | Layout of the checkboxes. |
size | size reflects | xs | sm | md | lg | xl | Size of the checkboxes that set none. | |
color | color reflects | string | Color of the checkboxes that set none. | |
descriptionPosition | description-position reflects | above | below | above | The description before the checkboxes or after them. |
| Event | Description |
|---|---|
change | The user checked or unchecked one (read value). |
input | Same moment as change. |
| Slot | Description |
|---|---|
| (default) | ray-checkbox elements (also nested in other markup). |