Zephora UI

Data

Avatar

User avatar with image source, deterministic initials fallback, presence status and an overlapping AvatarGroup with overflow counter.

Import

import { Avatar, AvatarGroup } from "@zephora/react";

Examples

Sizes and fallback

Broken or missing images fall back to initials colored deterministically from `name`.

ALGHATKJMargaret Hamilton

Status and shape

The presence dot announces itself with a matching aria-label.

ALGHATBL

Group with overflow

`max` collapses the remaining avatars into a +N counter.

ALGHAT+2

API

Avatar props

PropTypeDefaultDescription
srcstringImage source. Broken images automatically fall back to initials.
altstringAccessible label for the image / fallback. Defaults to `name`.
namestringPerson name — used for the initials fallback and its deterministic background color.
size"xs" | "sm" | "md" | "lg" | "xl""md"Avatar dimensions.
shape"circle" | "square""circle"Outline shape.
status"online" | "offline" | "busy" | "away"Presence indicator dot with a matching aria-label.
unstyledbooleanfalseHeadless mode — skips Zephora styling.

AvatarGroup props

PropTypeDefaultDescription
maxnumberMaximum avatars shown; the rest collapse into a "+N" counter.
size"xs" | "sm" | "md" | "lg" | "xl"Size applied to every child avatar.
shape"circle" | "square""circle"Shape applied to the overflow counter.
unstyledbooleanfalseHeadless mode — skips Zephora styling.