Avatar
Circular user representation in two variants - a neutral-fill initial, or a photo. Stack them in an overlapping group with a + button wired to your invite flow.
Installation
npx stepwise-ui add avatar
Default
A neutral fill with a zinc initial.
Accent
Pass textClassName for a different accent color.
Letters
Pass letters={2} for two initials instead of one.
Image
Pass any URL as src to use your own picture - it fills the circle by default, no extra setup. The 5 characters shown here are this docs site's own illustrations, not part of the installed component; copy the SVGs from public/avatars if you want them, or point src at anything else - a real photo needs nothing more than that. They're cropped with imagePosition="top" so the crop favors the face over the chest below it.
Badge
A small status dot on the bottom-right edge. Pass badge with one of the four presence states below.
Avatar Group
Hover any avatar to see their name. Hover the +N overflow pill to see everyone it's hiding. Pass onAdd to get the dashed + button - wire it up to whatever your invite flow needs.
Sizes
Props - Avatar
PropTypeDescription
srcstringImage URL. Falls back to the default variant if absent or broken.
namestringDrives the initial(s).
variant"letter" | "image"Defaults to "image" when src is set, else "letter".
size"xs" | "sm" | "default" | "lg"Default "default" (2.5rem / 40px).
letters1 | 2How many initials to show. Default 1.
imageFit"cover" | "contain""cover" fills edge to edge, cropped (default). "contain" insets art with its own margin.
imagePositionstringobject-position for the "cover" fit, e.g. "top". Default "center".
imageScalenumberScales the photo within its "cover" fit. Under 1 zooms out a touch. Default 1.
badge"online" | "away" | "busy" | "offline"Small status dot on the bottom-right edge. Omit for none.
borderedbooleanThe tinted border stroke. Default true - AvatarGroup turns it off itself.
showTooltipbooleanNames the avatar on hover, via Tooltip. Default true.
textClassNamestringOverrides the initial's color. Default "text-zinc-800 dark:text-zinc-200".
Props - AvatarGroup
PropTypeDescription
avatarsAvatarProps[]Array of avatar objects.
maxnumberMaximum avatars shown. Default 5.
sizeAvatarSizeSize applied to all avatars. Default "default".
onAdd() => voidShows the + button; called on click.