Skip to content

GhostCheckboxCard reference ​

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

Card-shaped member of GhostCheckboxGroup. A native label root wraps a group-member GhostCheckbox, so the whole card toggles the option, and the root mirrors the checked and disabled state for styling.

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

All component references

Props ​

NameTypeDefaultRequiredDescription
disabledbooleanfalseNoDisables this card. The card is also disabled when the group is.
valuestring—YesMember value, passed to the inner checkbox. An opaque string typed by the owning group.

Emits ​

None declared.

Models ​

None declared.

Slots ​

NameDescription
defaultThe option's accessible name. Phrasing content only.
descriptionSupporting detail, announced as the description. Phrasing content only.

Slot props: default ​

None declared.

Slot props: description ​

None declared.

Exposed members ​

NameTypeDescription
blur() => voidBlurs the inner checkbox.
elementHTMLLabelElement | nullThe `<label>` card root after mount, or `null` before mount.
focus(options?: FocusOptions) => voidFocuses the inner checkbox. A disabled checkbox does not take focus.
inputElementHTMLInputElement | nullThe inner checkbox input after mount, or `null` before mount.

Parts and data attributes ​

AttributeValueDescription
data-partrootNative <label> card root. Carries the selected and disabled state.
data-partlabelSpan holding the default slot. The input is named by it through aria-labelledby.
data-partdescriptionSpan holding the description slot, rendered only when the slot is provided. Joins the input's aria-describedby.
data-statecheckeddata-state="checked" on the root while the option is selected. Omitted otherwise.
data-statedisableddata-disabled on the root when the card or the group is disabled. A <fieldset disabled> ancestor does not set it; match :has(> input:disabled) for that case.

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
TabOne tab stop per enabled card.choice cards › room extras give each checkbox card its own tab stop and toggle with Space (@ghostvue/vue)
SpaceToggles the focused card.choice cards › room extras give each checkbox card its own tab stop and toggle with Space (@ghostvue/vue)
EnterSubmits the owning form when it has one (native). Does not change the selection.choice cards › room extras give each checkbox card its own tab stop and toggle with Space (@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 ​

None declared.