Skip to content

GhostBadge reference ​

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

Themed wrapper around headless GhostBadge. Same span semantics plus variant, tone, and size. Importing it loads the default stylesheet and scopes 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
variant'solid' | 'soft' | 'outline' | 'ghost'"soft"NoVisual treatment. The default omits data-variant so CSS can treat a missing hook as soft.
tone'accent' | 'neutral' | 'danger' | 'success' | 'warning'"neutral"NoSemantic color intent, independent of variant and not a status vocabulary. success and warning use the status tokens and are Badge-only; Button tones stay accent, neutral, and danger. The default omits data-tone.
size'sm' | 'md'"sm"NoCompact type and padding. The default omits data-size so CSS can treat a missing hook as sm. Does not use control minimum sizes.

Emits ​

None declared.

Models ​

None declared.

Slots ​

NameDescription
defaultShort status or metadata text and optional decorative icon content. Icon-only use needs real hidden text (GhostVisuallyHidden), not aria-label on the span.

Slot props: default ​

None declared.

Exposed members ​

NameTypeDescription
elementHTMLSpanElement | nullThe native span after mount; null before mount and after unmount. Delegates to the unstyled GhostBadge.

Parts and data attributes ​

AttributeValueDescription
data-partrootThe native span inside the display:contents themed scope.
data-particonOptional decorative icon content inside the default slot.

CSS variables ​

NameDescription
--ghost-surface-bgCanvas background on .ghost-theme and the mix surface for soft, outline, and ghost treatments.
--ghost-action-primary-bgSolid background and outline/ghost foreground for the accent tone.
--ghost-action-primary-fgContent color on the solid accent treatment.
--ghost-action-primary-borderBorder color on the solid accent treatment.
--ghost-action-neutral-bgSolid background and outline/ghost foreground for the default neutral tone.
--ghost-action-neutral-fgContent color on the solid neutral treatment.
--ghost-action-neutral-borderBorder color on the solid and outline neutral treatments.
--ghost-action-danger-bgSolid background and outline/ghost foreground for the danger tone.
--ghost-action-danger-fgContent color on the solid danger treatment.
--ghost-action-danger-borderBorder color on the solid and outline danger treatments.
--ghost-status-success-fgText color of the success tone, plus the fill of solid and the border of solid and outline success badges.
--ghost-status-success-bgSoft fill of the success tone and text color of solid success badges.
--ghost-status-success-borderBorder of the soft success tone.
--ghost-status-warning-fgText color of the warning tone, plus the fill of solid and the border of solid and outline warning badges.
--ghost-status-warning-bgSoft fill of the warning tone and text color of solid warning badges.
--ghost-status-warning-borderBorder of the soft warning tone.
--ghost-gradient-action-primaryOklch gradient fill for solid accent badges.
--ghost-gradient-action-neutralOklch gradient fill for solid neutral badges.
--ghost-gradient-action-dangerOklch gradient fill for solid danger badges.
--ghost-state-mix-softMix amount of the tone into the surface for the default soft treatment.
--ghost-state-mix-borderMix amount of the tone into the surface for the soft border.
--ghost-radius-pillCapsule corner radius of the themed badge.
--ghost-type-size-xsFont size for the default sm size.
--ghost-type-size-smFont size for size md.
--ghost-type-weight-mediumBadge label font weight.
--ghost-space-gap-xsSpace between label and icon, and default block padding.
--ghost-space-inset-xsDefault inline padding and md block padding.
--ghost-space-inset-smInline padding for size md.
--ghost-action-icon-sizeSize of content marked data-part=icon.
--ghost-focus-ring-colorOuter color of the two-color keyboard focus indicator when a consumer supplies tabindex.
--ghost-focus-ring-contrastInner color of the two-color keyboard focus indicator.

Accessibility ​

Role: generic. APG pattern: https://www.w3.org/WAI/ARIA/apg/practices/names-and-descriptions/.

Required ARIA attributes: none.

Keyboard ​

KeyActionAutomated browser test
TabDoes not land on the badge. The component is not a tab stop and adds no key handling.Not reviewed

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 ​

badge/release-channels ​

Example source

Release channels

Badge variants and semantic tones marking release channel status inside a card.

Release channels Sample data
  • v2.14.0-stablePromoted across all production edges
    Recommended
  • v2.15.0-rc.2Canary validation in staging cluster
    Preview
  • v2.13.4-ltsSecurity maintenance window ends Dec 31
    Deprecated

badge/themed ​

Example source

Themed

Visual props on the @ghostvue/themes wrapper.

DraftPaidDue soonOverdue

badge/icon ​

Example source

Icon

Optional decorative icon marked data-part=icon.

Live

badge/table ​

Example source

Table and filters

Cell statuses, counts, and active-filter summaries.

Status: OpenPriority: High

Reports
NameStatusCount
Q3 revenueActive12
Q4 forecastOverdue3