ComponentsDisplay
Avatar
A person's picture with initials as the fallback.
A person's picture with initials as the fallback.
<Avatar name="Ada Lovelace" />The same component at all four levels. Pick the one that fits your project; they share tokens, so they mix.
npm i junco @junco/tailwindimport { Avatar } from "junco";
<Avatar src={user.image} name={user.name} />Overlap avatars with negative margin and a ring in the page background color.
Avatar#srcnamefallbacksizeshapeclassNames| Prop | Type | Default |
|---|---|---|
srcImage URL. Falls back to initials while loading or on error. | string | – |
nameThe person's name: alt text and initials. | string | – |
fallbackCustom fallback content instead of initials. | ReactNode | – |
size24, 32, 40 or 48px. | "xs" | "sm" | "md" | "lg" | "md" |
shapeSquare suits teams and orgs. | "circle" | "square" | "circle" |
classNamesSlot overrides. | { root?, image?, fallback? } | – |