- Owner
- Maintainer
- Reviewer
- Automation
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.
Props
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
src | string | null | No | Image URL passed to the unstyled avatar. |
alt | string | null | No | Accessible name for the loaded img. |
name | string | null | No | Initials source and default alt. |
as | 'span' | 'div' | "span" | No | Root host forwarded to the unstyled avatar. |
size | 'sm' | 'md' | 'lg' | "md" | No | Square dimensions. Default omits data-size. |
Emits
None declared.
Models
None declared.
Slots
| Name | Description |
|---|---|
fallback | Custom fallback when the image is not shown. |
Slot props: fallback
None declared.
Exposed members
| Name | Type | Description |
|---|---|---|
element | HTMLElement | null | Root host after mount; null before mount. Delegates to the unstyled GhostAvatar. |
Parts and data attributes
| Attribute | Value | Description |
|---|---|---|
data-part | root | Circular frame on the native host inside ghost-themed-scope. |
data-part | image | Cover-fit photo when loaded. |
data-part | fallback | Centered initials or slot content. |
data-state | loading | Subtle opacity while the client probes src. |
data-state | loaded | Image visible. |
data-state | error | Fallback visible after load failure. |
CSS variables
| Name | Description |
|---|---|
--ghost-control-size-md-min | Default square size for md. |
--ghost-control-size-sm-min | Square size for sm. |
--ghost-control-size-lg-min | Square size for lg. |
--ghost-action-neutral-bg | Fallback initials color. |
--ghost-surface-bg | Fallback background mix surface. |
Accessibility
Role: generic. APG pattern: https://www.w3.org/WAI/ARIA/apg/practices/names-and-descriptions/.
Required ARIA attributes: none.
Keyboard
| Key | Action | Automated browser test |
|---|---|---|
Tab | Does 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.
| 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
avatar/team-roster
Member list showing a loaded photo, initials after a failed or missing photo, and an icon fallback, with role badges.
avatar/themed
Size hooks on the @ghostvue/themes wrapper.