Skip to content

GhostAvatar reference ​

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

Themed wrapper around headless GhostAvatar. Same host semantics plus 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
srcstringnullNoImage URL passed to the unstyled avatar.
altstringnullNoAccessible name for the loaded img.
namestringnullNoInitials source and default alt.
as'span' | 'div'"span"NoRoot host forwarded to the unstyled avatar.
size'sm' | 'md' | 'lg'"md"NoSquare dimensions. Default omits data-size.

Emits ​

None declared.

Models ​

None declared.

Slots ​

NameDescription
fallbackCustom fallback when the image is not shown.

Slot props: fallback ​

None declared.

Exposed members ​

NameTypeDescription
elementHTMLElement | nullRoot host after mount; null before mount. Delegates to the unstyled GhostAvatar.

Parts and data attributes ​

AttributeValueDescription
data-partrootCircular frame on the native host inside ghost-themed-scope.
data-partimageCover-fit photo when loaded.
data-partfallbackCentered initials or slot content.
data-stateloadingSubtle opacity while the client probes src.
data-stateloadedImage visible.
data-stateerrorFallback visible after load failure.

CSS variables ​

NameDescription
--ghost-control-size-md-minDefault square size for md.
--ghost-control-size-sm-minSquare size for sm.
--ghost-control-size-lg-minSquare size for lg.
--ghost-action-neutral-bgFallback initials color.
--ghost-surface-bgFallback background mix surface.

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 avatar unless the consumer adds tabindex.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 ​

avatar/team-roster ​

Example source

Team roster

Member list showing a loaded photo, initials after a failed or missing photo, and an icon fallback, with role badges.

Core maintainers4 members
  • Ada LovelaceDesign Systems
    Owner
  • Grace HopperPlatform Infrastructure
    Maintainer
  • Alan TuringAccessibility QA
    Reviewer
  • Release botPublishes tagged builds
    Automation

avatar/themed ​

Example source

Themed

Size hooks on the @ghostvue/themes wrapper.

AKBOCN