Data display
IAvatar
A person or an organisation, at a glance, with initials when there is no image.
Initials
name is enough: the first letters of the first and last words are used, so "Ana María Ruiz Vega" gives AV. A single name gives one letter. Pass initials to override.
With an image
The initials show while the image loads and stay if it fails. Set delay-ms to hold them back briefly, so a fast connection goes straight to the photo.
<IAvatar src="/ana.jpg" name="Ana Ruiz" :delay-ms="400" />alt defaults to empty, since an avatar usually sits beside the same person's name. Give it an alt when the image is the only mention of who this is.
Sizes and shapes
Circle for a person, square for a company or a project.
Status
A presence dot in the corner, ringed in the page background.
The dot carries a name, defaulting to the status word. Pass status-label for something more specific.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
src | string | — | |
alt | string | '' | Leave empty beside a visible name |
name | string | — | Drives the initials |
initials | string | — | Overrides the derived initials |
size | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'md' | |
shape | 'circle' | 'square' | 'circle' | |
status | 'online' | 'busy' | 'away' | 'offline' | — | Presence dot |
statusLabel | string | the status word | Names that dot |
delayMs | number | — | Hold the fallback back while the image loads |
unstyled | boolean | — | Skip built-in classes |
ui | { root?, image?, fallback?, status? } | — | Per-slot class overrides |
Slots
| Slot | Description |
|---|---|
fallback | Replaces the initials — an icon, say |
See IAvatarGroup for stacking several of them together.