GhostCheckboxGroup reference
Package: @ghostvue/vue. Status: experimental (stability policy).
Headless native checkbox group root with string[] v-model, form reset, and focus restoration on focused member removal.
Generated from the component manifest. Edit the manifest or Vue source, then rebuild the docs.
Props
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
as | GhostCheckboxGroupElement | "fieldset" | No | Root host. A `fieldset` needs no role. Any other host gets `role="group"`. |
defaultValue | readonly TValue[] | "[]" | No | Uncontrolled seed and form-reset baseline. Shallow-copied once at setup; later prop changes and later mutation of the passed array are ignored. |
disabled | boolean | false | No | Disables every member input natively. On a `fieldset` root it also sets the native `disabled` attribute. |
invalid | boolean | false | No | Group-level error hook for Field or form integration. Sets `data-state="invalid"` and `aria-invalid="true"` on the root. |
modelValue | readonly TValue[] | — | No | Controlled selection. `undefined` is uncontrolled. `[]` is a defined empty selection. Accepts readonly and frozen arrays; never mutated. |
name | string | — | No | Native `name` applied to every member input. Without a group `name`, members without their own `name` submit nothing. |
Emits
None declared.
Models
| Prop | Event | Type | Description |
|---|---|---|---|
modelValue | update:modelValue | readonly TValue[] | v-model binding for `modelValue`. |
Slots
| Name | Description |
|---|---|
default | Member checkboxes, labels, legend, descriptions, and non-member content. |
Slot props: default
None declared.
Exposed members
| Name | Type | Description |
|---|---|---|
blur | () => void | Blurs the active member if it is inside the group. |
element | HTMLElement | null | The root element after mount, or `null` before mount. |
focus | (options?: FocusOptions) => void | Focuses the first enabled checked member in DOM order, else the first enabled member. |
Parts and data attributes
| Attribute | Value | Description |
|---|---|---|
data-part | root | Fieldset or role="group" host for member checkboxes and optional non-member controls. |
data-state | invalid | Group-level error state. Wins over disabled when both apply. |
data-state | disabled | Whole group disabled. |
CSS variables
None declared.
Accessibility
Role: group. APG pattern: https://www.w3.org/WAI/ARIA/apg/patterns/checkbox/.
Required ARIA attributes: none.
Keyboard
| Key | Action | Automated browser test |
|---|---|---|
Tab | Moves focus to the next enabled checkbox in DOM order, skipping disabled checkboxes. | GhostCheckboxGroup › supports Tab/Shift+Tab order, Space toggling, Enter no-op, and focus after removal @cross-browser (@ghostvue/vue) |
Shift+Tab | Moves focus to the previous enabled checkbox in DOM order. | GhostCheckboxGroup › supports Tab/Shift+Tab order, Space toggling, Enter no-op, and focus after removal @cross-browser (@ghostvue/vue) |
Space | Toggles the focused checkbox. On a member it emits the next string[] model once. | GhostCheckboxGroup › supports Tab/Shift+Tab order, Space toggling, Enter no-op, and focus after removal @cross-browser (@ghostvue/vue) |
Enter | Does not toggle checkboxes. Inside a form, triggers implicit submission. | GhostCheckboxGroup › supports Tab/Shift+Tab order, Space toggling, Enter no-op, and focus after removal @cross-browser (@ghostvue/vue) |
Verification
Each category is reviewed separately. Automated keyboard and axe results do not attest manual or assistive-technology review.
| Category | Status | Evidence |
|---|---|---|
| Automated keyboard | Passed | Every declared key maps to a Chromium browser test that CI runs and requires to pass on every commit. |
| Manual interaction | Not reviewed | No review recorded. |
| Assistive technology | Not reviewed | No review recorded. |
Examples
checkbox-group/headless
Headless composition Headless
Unstyled GhostCheckboxGroup and GhostCheckbox from @ghostvue/vue.