Skip to Content
DocsResourcesShowcase

Avatar

Used to represent user profile picture or initials

SourceStorybookRecipeArk
SA

import { Avatar, AvatarGroup } from '@saas-ui/react/avatar'
<AvatarGroup>
  <Avatar />
</AvatarGroup>

Use the size prop to change the size of the avatar

S
S
S
S
S
S

Use the shape prop to change the shape of the avatar, from rounded to square

DA
SA
RU

The initials of the name can be used as a fallback when the src prop is not provided or when the image fails to load.

OK
SU

Use the outline* props to add a ring around the avatar

R
R
R

Use the Group component to group multiple avatars together

US
BA
UC
+3

When using the AvatarGroup component, you can use the stacking prop to change the stacking order of the avatars

US
BA
UC
+3
US
BA
UC
+3
US
BA
UC
+3

PropDefaultType
colorPalette 'gray'
'gray' | 'red' | 'orange' | 'yellow' | 'green' | 'teal' | 'blue' | 'cyan' | 'purple' | 'pink' | 'accent'

The color palette of the component

size 'md'
'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl'

The size of the component

variant 'subtle'
'solid' | 'subtle' | 'outline'

The variant of the component

shape 'full'
'square' | 'rounded' | 'full'

The shape of the component

asChild
boolean

Use the provided child element as the default rendered element, combining their props and behavior.

For more details, read our Composition guide.
ids
Partial<{ root: string; image: string; fallback: string }>

The ids of the elements in the avatar. Useful for composition.

onStatusChange
(details: StatusChangeDetails) => void

Functional called when the image loading status changes.

borderless
'true' | 'false'

The borderless of the component

as
React.ElementType

The underlying element to render.

unstyled
boolean

Whether to remove the component's style.

PropDefaultType
asChild
boolean

Use the provided child element as the default rendered element, combining their props and behavior.

For more details, read our Composition guide.
name
string

icon
React.ReactElement

PropDefaultType
asChild
boolean

Use the provided child element as the default rendered element, combining their props and behavior.

For more details, read our Composition guide.

Previous

Alert

Next

Badge