Avatar

Person or entity image with initials fallback.

Add it to your project

Eject the complete avatar group, then import from its generated local barrel. The copied source and CSS belong to your application.

bash
pnpm exec toucan eject avatar
app.tsx
import { Avatar } from '@/components/toucan/avatar';

Use when

A person or entity benefits from a compact visual identifier.

Avoid when

The image is editorial content rather than identity metadata.

Example

API reference

Generated from packages/react/src/components. Only Toucan-specific props are listed; forwarded native props remain available as noted for each export.

Avatar

Avatar

Props type: AvatarProps

NameTypeDefaultRequiredDescription
altstringundefinedNoAlternative text for the avatar image.
initialsstringundefinedNoFallback initials shown when no avatar image is available.
size"sm" | "md" | "lg"'md'NoVisual size variant.
srcstringundefinedNoAvatar image URL.
variant"neutral" | "primary"'neutral'NoSemantic visual variant.

Also accepts the native span attributes that are not replaced by a Toucan prop.

Type exports

AvatarProps

Accessibility

  • Supply meaningful alt text for informative images; initials provide a text fallback.

Token families

avatar

Related components