Avatar
FrondA
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.
nameis required: it's the alt text, and the initial when there's no image.fallbackpicks what shows without an image: theinitial(the default), theleaffor Fern Bot, Fern Clerk's nib (clerk) for what Fern Clerk did, or auser-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