GhostKbd reference
Package: @ghostvue/vue. Status: experimental (stability policy).
Headless native kbd for inline keyboard-shortcut display. useGhostKbd owns key-token labels and SSR-safe platform detection; GhostKbd is the thin unstyled element. Themed keycap chrome lives on @ghostvue/themes.
Generated from the component manifest. Edit the manifest or Vue source, then rebuild the docs.
Props
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
keys | readonly string[] | string | "[]" | No | Key tokens rendered as nested kbd elements. A string is one key; an array is a combination. Tokens are matched case-insensitively. Unknown tokens render as given, except a single letter is uppercased. |
platform | GhostKbdPlatform | "auto" | No | Modifier label set. auto uses PC labels until after mount, then Apple labels when the browser looks like Apple. Explicit apple and pc are deterministic from the prop. |
Emits
None declared.
Models
None declared.
Slots
| Name | Description |
|---|---|
default | Key content. When keys is omitted, this is the entire kbd contents. When keys is set, this is appended after a plus separator as extra combination content. |
Slot props: default
None declared.
Exposed members
None declared.
Parts and data attributes
| Attribute | Value | Description |
|---|---|---|
data-part | root | The outer native kbd element. |
data-part | key | Nested kbd for one token from the keys prop. |
data-part | separator | Literal plus between keys. Stays in the accessibility tree. |
CSS variables
None declared.
Accessibility
Role: generic. APG pattern: https://www.w3.org/WAI/ARIA/apg/practices/names-and-descriptions/.
Required ARIA attributes: none.
Keyboard
None declared.
Verification
Each category is reviewed separately. Automated keyboard and axe results do not attest manual or assistive-technology review.
| Category | Status | Evidence |
|---|---|---|
| Automated keyboard | Not reviewed | No declared key is mapped to a browser test yet. |
| Manual interaction | Not reviewed | No review recorded. |
| Assistive technology | Not reviewed | No review recorded. |
Examples
kbd/basic
Native kbd chrome for a single key.
kbd/composable
Same contract as GhostKbd, applied to a native host.
kbd/combination
Key tokens plus a trailing slot key.
kbd/platform
Explicit Apple and PC modifier labels.