Avatar
An image with a fallback, alone or stacked.
Sizes
Use md (the default) in most places, sm in lists and dense UI, and lg in profile headers. Set size on Avatar.Root.
Fallback
Avatar.Fallback shows when the image fails or when there is none.
Stacked group
Use a group for the people on a team or in a thread. Avatar.Group stacks its avatars and sets their size. max shows the first avatars and a "+N" count.
Reverse stacking
Set reverse to keep the first avatar above later avatars. The visible order stays the same.
Usage
These are defaults, not laws. Break one when you have a good reason, or when it makes the design more cohesive or more interesting.
- Always add
Avatar.Fallbackwith initials. Images can fail or load slowly. - Give
Avatar.Groupanaria-label, such as "Team members". maxcounts direct children, so a fragment of avatars counts as one.
API
Props that the library adds. Avatar.Root, Avatar.Image, and Avatar.Fallback also take all the Base UI props. Avatar.Group is a site part and takes all the props of a <div>.
Avatar.Root
| Prop | Type | Default | Description |
|---|---|---|---|
| size | 'sm' | 'md' | 'lg' | 'md' | Diameter and text size. Inside an Avatar.Group, the group sets the size. |
Avatar.Group
| Prop | Type | Default | Description |
|---|---|---|---|
| size | 'sm' | 'md' | 'lg' | 'md' | Sets the size of every avatar. |
| reverse | boolean | false | Places later avatars underneath earlier avatars. Does not change reading order. |
| max | number | – | The number of avatars to show. A "+N" count replaces the rest. Without max, all show. |





