Skip to content

GhostCheckbox reference ​

Package: @ghostvue/vue. Status: experimental (stability policy).

Headless native checkbox. useGhostCheckbox owns boolean v-model and mixed state; GhostCheckbox is the thin unstyled input. Themed visual props live on @ghostvue/themes.

Generated from the component manifest. Edit the manifest or Vue source, then rebuild the docs.

All component references

Props ​

NameTypeDefaultRequiredDescription
defaultValuebooleanfalseNoInitial checked state when modelValue is omitted. Later changes are ignored.
disabledbooleanfalseNoNative disabled semantics: no activation, no sequential focus, and excluded from form submission.
indeterminatebooleanfalseNoMixed state for select-all and similar. Applied through the DOM indeterminate property. Consumer-owned; not part of the v-model.
modelValueboolean—NoControlled checked state. Omit it for uncontrolled use. undefined is uncontrolled; false is unchecked. Mixed is the indeterminate prop, not a third model value.

Emits ​

None declared.

Models ​

PropEventTypeDescription
modelValueupdate:modelValuebooleanChecked state. Activation emits the native post-click boolean.

Slots ​

None declared.

Exposed members ​

NameTypeDescription
blur() => voidRemoves focus from the native checkbox when it is mounted. No-op before mount.
elementHTMLInputElement | nullThe native checkbox after mount; null before mount and after unmount.
focus(options?: FocusOptions) => voidFocuses the native checkbox when it is mounted and enabled. No-op before mount.

Parts and data attributes ​

AttributeValueDescription
data-partrootThe native checkbox input.
data-statecheckedChecked and not mixed. Omitted while unchecked.
data-stateindeterminateMixed visual and AT state. Wins over checked when both apply.

CSS variables ​

None declared.

Accessibility ​

Role: checkbox. APG pattern: https://www.w3.org/WAI/ARIA/apg/patterns/checkbox/.

Required ARIA attributes: none.

Keyboard ​

KeyActionAutomated browser test
SpaceToggle checked when the control is enabled. Follows native mixed activation.GhostCheckbox › toggles from Space, shows mixed select-all, and has no axe violations (@ghostvue/vue)
EnterDoes not toggle. In a form, submits.GhostCheckbox › toggles from Space, shows mixed select-all, and has no axe violations (@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/basic ​

Example source

Basic Headless

Labeled native checkbox with a boolean v-model.

checkbox/composable ​

Example source

Composable Headless

Same contract as GhostCheckbox, applied to a native host.

checkbox/indeterminate ​

Example source

Indeterminate Headless

Select-all mixed state computed from child checkboxes.

checkbox/ref ​

Example source

Component ref Headless

Template refs expose element, focus, and blur.