Toggle Sidebar B
AppearanceLight & dark mode D

Avatar

User profile image with an initials fallback in one of two colour styles, and a status indicator. Pass a model object with name and optional profile_image to render.

Basic

Pass a model with a name; the avatar renders initials as a fallback.

Dark previewReplay preview
SD
BC

Default

Auto-generates initials and a hashed mesh-gradient background from the name.

Dark previewReplay preview
OM
JL
IN

Variants

variant picks the look of the initials fallback: mesh (the default) or gel. Both take their hue from the name, so a person keeps the same colour in either style.

mesh is three radial blobs over a deep base. gel is a glossy app-icon tile rebuilt from the Iconly set: it reads best with rounded="rounded-[38%]", and its light rim softens in dark mode. In both, the initials are always white: a colourway too light for them is darkened just enough to keep 3:1 contrast. Every colour is written in OKLCH.

Dark previewReplay preview
mesh
OM
JL
IN
WK
SD
gel
OM
JL
IN
WK
SD

Gel colourways

Gel has thirteen colourways pinned to AVATAR_GEL_ANCHOR_HUES; any other hue blends the two nearest. Pass hue to pin a colour instead of hashing the name.

Dark previewReplay preview
GE
GE
GE
GE
GE
GE
GE
GE
GE
GE
GE
GE
GE

Size

The avatar scales to its box, so set the dimensions with a size utility class.

Dark previewReplay preview
OM
OM
OM
OM
OM

With image

Pass a profile_image map keyed by size (sm, md, lg).

Dark previewReplay preview
Olivia Martin

Status indicator

Add a coloured dot for presence or status.

Dark previewReplay preview
JL
JL
JL
JL

Rounding

circle for full round, rounded prop for any Tailwind rounded class.

Dark previewReplay preview
IN
IN
IN
IN

API Reference

Avatar

PropTypeDefaultDescription
model{ name?: string, profile_image?: Record<string, string> }User-like object. Falls back to initials when profile_image is missing.
size"sm" | "md" | "lg""sm"Key used to pick the URL from profile_image.
roundedstring"rounded-lg"Tailwind rounded class. Use squircle for icon-style avatars.
circlebooleanfalseForce rounded-full.
colorfulbooleantrueColour the initials fallback. false renders a neutral muted fill.
variant"mesh" | "gel""mesh"Look of the initials fallback.
huenumbernullPins the fallback hue (0-359) instead of hashing the name. Hashing never lands on AVATAR_EXCLUDED_HUES (64-120).
gradientFramebooleanfalseInstagram-style rotating gradient frame around the avatar.
indicator"success" | "info" | "warning" | "destructive" | "primary"nullColoured dot in the bottom-right corner.
noTooltipbooleanfalseDisable name tooltip when inside AvatarGroup.