Skip to content

GhostKbd reference ​

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

Themed wrapper around headless GhostKbd. Same keys and platform props plus size. Importing it loads the default stylesheet and scopes keycap styles to this instance. Hand-written until GHO-13 generates manifests.

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

All component references

Props ​

NameTypeDefaultRequiredDescription
keysstring | readonly string[]—NoKey tokens forwarded to the unstyled GhostKbd.
platform'auto' | 'apple' | 'pc'"auto"NoModifier label set forwarded to the unstyled GhostKbd.
size'sm' | 'md' | 'lg'"md"NoType and inset scale. The default omits data-size so CSS can treat a missing hook as md.

Emits ​

None declared.

Models ​

None declared.

Slots ​

NameDescription
defaultKey content forwarded to the unstyled GhostKbd.

Slot props: default ​

None declared.

Exposed members ​

None declared.

Parts and data attributes ​

AttributeValueDescription
data-partrootThe outer native kbd inside the display:contents themed scope. Combination roots drop keycap chrome.
data-partkeyNested keycap for one token from the keys prop.
data-partseparatorMuted plus between keycaps.

CSS variables ​

NameDescription
--ghost-elevation-0-bgKeycap background.
--ghost-elevation-0-borderKeycap border color.
--ghost-elevation-0-shadowKeycap shadow.
--ghost-elevation-0-highlightKeycap inset highlight.
--ghost-surface-fgKeycap text color.
--ghost-text-mutedCombination separator color.
--ghost-border-hairline-widthKeycap border width.
--ghost-radius-smDefault keycap corner radius.
--ghost-radius-mdLarge keycap corner radius.
--ghost-type-family-sansKeycap font family.
--ghost-type-size-xsSmall keycap font size.
--ghost-type-size-smDefault keycap font size.
--ghost-type-size-mdLarge keycap font size.
--ghost-type-weight-mediumKeycap font weight.
--ghost-type-letter-tightKeycap letter spacing.
--ghost-type-line-tightKeycap line height.
--ghost-space-gap-xsDefault keycap block padding, small padding, and combination gap.
--ghost-space-gap-smDefault keycap inline padding.
--ghost-space-inset-xsLarge keycap padding.

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.

CategoryStatusEvidence
Automated keyboardNot reviewedNo declared key is mapped to a browser test yet.
Manual interactionNot reviewedNo review recorded.
Assistive technologyNot reviewedNo review recorded.

Examples ​

kbd/command-shortcuts ​

Example source

Command shortcut sheet

Platform-switchable keyboard shortcut list rendered with themed GhostKbd keycaps.

Keyboard shortcuts
  • Command palette⌘+K
  • Save draft⌘+S
  • Toggle sidebar⌘+⇧+B
  • Close dialogEsc

kbd/themed ​

Example source

Themed

Keycap chrome and size on the @ghostvue/themes wrapper.

Save withCtrl+SorEscto cancel.