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.
Props
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
disabled | boolean | false | No | Disables this card. The card is also disabled when the group is. |
value | string | — | Yes | Member value, passed to the inner checkbox. An opaque string typed by the owning group. |
Emits
None declared.
Models
None declared.
Slots
| Name | Description |
|---|---|
default | The option's accessible name. Phrasing content only. |
description | Supporting detail, announced as the description. Phrasing content only. |
Slot props: default
None declared.
Slot props: description
None declared.
Exposed members
| Name | Type | Description |
|---|---|---|
blur | () => void | Blurs the inner checkbox. |
element | HTMLLabelElement | null | The `<label>` card root after mount, or `null` before mount. |
focus | (options?: FocusOptions) => void | Focuses the inner checkbox. A disabled checkbox does not take focus. |
inputElement | HTMLInputElement | null | The inner checkbox input after mount, or `null` before mount. |
Parts and data attributes
| Attribute | Value | Description |
|---|---|---|
data-part | root | Native <label> card root. Carries the selected and disabled state. |
data-part | label | Span holding the default slot. The input is named by it through aria-labelledby. |
data-part | description | Span holding the description slot, rendered only when the slot is provided. Joins the input's aria-describedby. |
data-state | checked | data-state="checked" on the root while the option is selected. Omitted otherwise. |
data-state | disabled | data-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
| Key | Action | Automated browser test |
|---|---|---|
Tab | One tab stop per enabled card. | choice cards › room extras give each checkbox card its own tab stop and toggle with Space (@ghostvue/vue) |
Space | Toggles the focused card. | choice cards › room extras give each checkbox card its own tab stop and toggle with Space (@ghostvue/vue) |
Enter | Submits 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.
| 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
None declared.