Koala logo Design
Esc
No matches for “
↑↓ navigate open Esc close
Components Avatars

Avatars

Round portrait for a user, partner, or organisation. Image served by the avatar API with a deterministic initials fallback so every avatar always renders — no broken squares, no missing alt text.

<koala-avatar>

Canonical

Jane Doe

Medium size, deterministic initials fallback. The image is served by /api/avatars/{id} with a deterministic initials fallback so it always renders.

Variants

6 variants
Jane Doe
Small
size="Small"
Jane Doe
Medium
size="Medium"
Jane Doe
Large
size="Large"
Jane Doe
Photo
has-avatar="true"
Koala Partners
Partner
koala-partner-avatar
Acme Conveyancing
Organisation
koala-organisation-avatar

States

3 states
JD
Initials fallback
No uploaded image; deterministic initials
User photo
Photo
Avatar API returns the uploaded blob
?
Empty
No name or email; placeholder initials

Props

7 attributes
Attribute Values Notes
size Small, Medium, Large Defaults to Small (w-7). Medium is w-10, Large is w-20.
user-id Guid Selects the avatar endpoint at /api/avatars/{id}.
first-name / last-name string Used for the initials fallback and the alt attribute.
email string Fallback display name when first/last are missing.
avatar-version string Cache-busting key. Blob name when a real image is stored; initials key otherwise.
has-avatar bool Back-compat flag; only influences the cache key now.
href URL Wraps the image in an Alpine-AJAX anchor with x-target.push="main".

Do & don't

JD Jane Doe
Do Pair the avatar with the person's name when space allows. The fallback initials encode the same identity, so the two never disagree.
JD
Don't Don't square-corner the user avatar. Round corners signal a person; the squared variant is reserved for partner and organisation crests.

Partner avatar

Square-cornered crest with deterministic initials fallback. Used everywhere a partner is named — sidebar header, switcher menu, quote rows, branch lists.

<koala-partner-avatar>
Koala Partners
Attribute Values Notes
sizeSmall, Medium, LargeSame scale as koala-avatar.
partner-idGuidSelects the partner crest endpoint at /api/partners/{id}/avatar.
namestringUsed for the initials fallback and the alt attribute.
has-avatarbool?Legacy cache-key flag.
avatar-versionstringCache-busting key. Blob name when an uploaded crest exists.
show-tooltipboolWhen true, hovers show the partner name in a Tippy tooltip.

Organisation avatar

Square-cornered crest for an organisation (conveyancing firm). Same scale and fallback rules as koala-partner-avatar — just a different endpoint and identity field.

<koala-organisation-avatar>
Acme Conveyancing
Attribute Values Notes
sizeSmall, Medium, LargeSame scale as koala-avatar.
organisation-idGuidSelects the org crest endpoint at /api/organisations/{id}/avatar.
namestringUsed for the initials fallback and the alt attribute.
has-avatarbool?Legacy cache-key flag.
avatar-versionstringCache-busting key. Blob name when an uploaded crest exists.

Phase 3 of the design-system audit recommends collapsing user, partner, and organisation avatars into one polymorphic <koala-avatar entity="..."> helper. Until that lands these three remain three helpers with three pages-within-a-page.