Skip to content
Browse docs and components

Avatar

avatar

A user image with a fallback that shows initials while the image loads, and when it never arrives at all. Built on the Base UI avatar primitive, so the image and the fallback swap without a flash of empty space.

Responsive

Install

$npxshadcnadd@forme/avatar

Adds the component, its registry dependencies, and the token stylesheet you import once.

API reference

Read from the source, so it is the API of the file you install. A prop marked * is required.

Avatar

PropTypeDefaultDescription
size'md' | 'lg' | 'sm'"md"

Also takes every prop of Base UI Avatar.Root.

The other parts

  • AvatarImageTakes Base UI Avatar.Image
  • AvatarFallbackTakes Base UI Avatar.Fallback