Avatar
A unified avatar component that displays a person's initials or photo. Colors are automatically derived from the name via a hash function for consistent per-person coloring.
Interactive Playground
PlaygroundInteractive
Size:
Shape:
LK
Luis KernInitials (Basic)
Demo
AG
LM
SK
CR
Sizes
Sizes
AG
LM
SK
CR
Square Shape
Square
AG
LM
SK
With Footer Label
With Label
AG
Ana GarcíaLM
Luis MartínezSK
Sofia KimImage Source
With Image
API Reference
| Prop | Type | Default | Description |
|---|---|---|---|
name | string | null | null | Name used to generate initials and as tooltip/alt text |
src | string | null | null | Image URL — takes priority over initials when provided |
size | "sm" | "md" | "lg" | "xl" | "md" | Size preset |
shape | "circle" | "square" | "circle" | Shape of the avatar |
color | string | "auto" | "auto" | Auto-color from name hash, or a custom CSS color string |
label | boolean | false | Optional footer label (shows the full name below the avatar) |
Deprecated Components
PxInitialsAvatar is kept for backward compatibility but internally delegates to PxAvatar. Migrate when convenient:
diff
- import { PxInitialsAvatar } from 'praxis-vue-ui'
+ import { PxAvatar } from 'praxis-vue-ui'
- <PxInitialsAvatar name="Alice Johnson" size="xlarge" />
+ <PxAvatar name="Alice Johnson" size="xl" />