Skip to content

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.

All component references

Props ​

NameTypeDefaultRequiredDescription
asGhostCheckboxGroupElement"fieldset"NoRoot host. A `fieldset` needs no role. Any other host gets `role="group"`.
defaultValuereadonly TValue[]"[]"NoUncontrolled seed and form-reset baseline. Shallow-copied once at setup; later prop changes and later mutation of the passed array are ignored.
disabledbooleanfalseNoDisables every member input natively. On a `fieldset` root it also sets the native `disabled` attribute.
invalidbooleanfalseNoGroup-level error hook for Field or form integration. Sets `data-state="invalid"` and `aria-invalid="true"` on the root.
modelValuereadonly TValue[]—NoControlled selection. `undefined` is uncontrolled. `[]` is a defined empty selection. Accepts readonly and frozen arrays; never mutated.
namestring—NoNative `name` applied to every member input. Without a group `name`, members without their own `name` submit nothing.

Emits ​

None declared.

Models ​

PropEventTypeDescription
modelValueupdate:modelValuereadonly TValue[]v-model binding for `modelValue`.

Slots ​

NameDescription
defaultMember checkboxes, labels, legend, descriptions, and non-member content.

Slot props: default ​

None declared.

Exposed members ​

NameTypeDescription
blur() => voidBlurs the active member if it is inside the group.
elementHTMLElement | nullThe root element after mount, or `null` before mount.
focus(options?: FocusOptions) => voidFocuses the first enabled checked member in DOM order, else the first enabled member.

Parts and data attributes ​

AttributeValueDescription
data-partrootFieldset or role="group" host for member checkboxes and optional non-member controls.
data-stateinvalidGroup-level error state. Wins over disabled when both apply.
data-statedisabledWhole 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 ​

KeyActionAutomated browser test
TabMoves 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+TabMoves 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)
SpaceToggles 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)
EnterDoes 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.

CategoryStatusEvidence
Automated keyboardPassedEvery declared key maps to a Chromium browser test that CI runs and requires to pass on every commit.
Manual interactionNot reviewedNo review recorded.
Assistive technologyNot reviewedNo review recorded.

Examples ​

checkbox-group/headless ​

Example source

Headless composition Headless

Unstyled GhostCheckboxGroup and GhostCheckbox from @ghostvue/vue.

Workspace security

Model: ["audit"]