Avatar

Frond
People and orgs at 24, 32 or 40px.
A
G
A

Usage

The import, then a use to start from. Both copy as they are.

Import
import { Avatar } from "@/components/ui/Avatar";
Example
<Avatar name={member.name} src={member.picture} size={32} />

When to use

Use it for

  • People and organizations: 24px in dense rows, 32px in lists, 40px in headers.
  • name is required: it's the alt text, and the initial when there's no image.
  • fallback picks what shows without an image: the initial (the default), the leaf for Fern Bot, Fern Clerk's nib (clerk) for what Fern Clerk did, or a user-glyph.

Avoid

  • Sizes other than 24, 32 and 40.
  • A hand-drawn circle with an initial in it.

Accessibility

Checks

  • The alt text comes from name, so pass the person's or organization's real name.

API

Read from each component's stories, the same source as COMPONENTS.md, and kept in step by check:design-system.

Avatar

Its stories don't declare argTypes, so no props are listed. The variants show its states.
VariantsDefaultExtraSmallSmallInitialFallbackUserGlyphFallbackLeafFallbackClerkFallbackBrokenImageFallbackWithCustomClassNameUnoptimizedRemoteHost

Keep going