Skip to documentation

ComponentsData & surfaces

Avatar

Shared primitive

Identify a person or workspace in a stable frame.

@/components/ui/avatar

Composition preview

Try Avatar alongside its related data & surfaces components. These examples keep all actions local.

PEDraftScheduledPublished
Upcoming posts
A focused surface for related content.

Keep useful content in the card body.

Illustrative design-system records.
PostStatus
A small product updateDraft
A useful lessonApproved

Usage

import { Avatar, AvatarImage, AvatarFallback } from "@/components/ui/avatar";

<>
<Avatar>
  <AvatarImage src="/profile.jpg" alt="Profile" />
  <AvatarFallback>JP</AvatarFallback>
</Avatar>
</>

Composition recipe. Supply application state, handlers and persistence in the owning product component. Inspect the installed source before extending its API.

API & composition

AvatarImage src/alt, AvatarFallback; size

Usage & accessibility

Always provide a fallback. Channel logos and provider-specific previews remain product compositions.

Implementation contract

src/components/ui/avatar.tsx

Use named variants and semantic theme tokens. Preserve existing input values, refs, focus and cancellation behavior. Verify keyboard, narrow layouts and pending/error states when behavior changes.

V-2026-10-19_18.07.14