Avatar

Image with a built-in fallback. Pairs AvatarImage with AvatarFallback — the fallback shows whenever the image is missing, loading, or errors. Static — the badge, group, and group-count slots compose on top.

Basic

VC
VK
BL

Sizes

VC
VC
VC

Gradient

Set variant="gradient" with a stable seed string (user id, handle, or any unique key) to render a deterministic two-stop gradient. Hierarchy comes from chroma + size, not heavy weight — the letter sits on the gradient at default weight.

AC
MK
BX
LD
PR
JH

With status badge

VC
BL

Group

VC
SV
BL
+3

Avatar.Root props

Inherits from bits-ui Avatar.Root. Image, Fallback, Badge, Group, and GroupCount each accept standard HTML attributes.

PropTypeDescription
'default' | 'sm' | 'lg'Sets the avatar diameter via data-size. Group slots inherit this.
'default' | 'gradient'Visual treatment. Gradient renders a deterministic two-stop surface seeded by the seed prop — used when no image is available.
stringStable seed for the gradient (user id, handle). Same seed → same gradient. Required when variant is "gradient".
'loading' | 'loaded' | 'error' (bindable)Reflects the current image load state. Two-way bindable — read it to sync external UI.
numberDelay before the fallback renders while the image is loading.
stringMerged onto the root via tailwind-merge.