PatternFly

Avatar

An avatar is a visual used to represent a user. It may contain an image or a placeholder graphic.

Examples

Basic

avatar

Size variations

Small
avatar
Medium
avatar
Large
avatar
Extra Large
avatar

Bordered - light

avatar

Bordered - dark

avatar

Props

Avatar

*required
NameTypeDefaultDescription
altrequiredstringAttribute that specifies the alternate text of the image for the Avatar.
border'light' | 'dark'Border to add
classNamestring''Additional classes added to the Avatar.
size'sm' | 'md' | 'lg' | 'xl'Size variant of avatar.
srcstring''Attribute that specifies the URL of the image for the Avatar.

CSS variables

Expand or collapse columnSelectorVariableValue
.pf-v5-c-avatar--pf-v5-c-avatar--BorderColor
transparent
.pf-v5-c-avatar--pf-v5-c-avatar--BorderWidth
0
.pf-v5-c-avatar--pf-v5-c-avatar--BorderRadius
30em
.pf-v5-c-avatar--pf-v5-c-avatar--Width
2.25rem
.pf-v5-c-avatar--pf-v5-c-avatar--Height
2.25rem
.pf-v5-c-avatar--pf-v5-c-avatar--m-sm--Width
1.5rem
.pf-v5-c-avatar--pf-v5-c-avatar--m-sm--Height
1.5rem
.pf-v5-c-avatar--pf-v5-c-avatar--m-md--Width
2.25rem
.pf-v5-c-avatar--pf-v5-c-avatar--m-md--Height
2.25rem
.pf-v5-c-avatar--pf-v5-c-avatar--m-lg--Width
4.5rem
.pf-v5-c-avatar--pf-v5-c-avatar--m-lg--Height
4.5rem
.pf-v5-c-avatar--pf-v5-c-avatar--m-xl--Width
8rem
.pf-v5-c-avatar--pf-v5-c-avatar--m-xl--Height
8rem
.pf-v5-c-avatar--pf-v5-c-avatar--m-light--BorderColor
#d2d2d2
.pf-v5-c-avatar--pf-v5-c-avatar--m-light--BorderWidth
1px
.pf-v5-c-avatar--pf-v5-c-avatar--m-dark--BorderColor
#4f5255
.pf-v5-c-avatar--pf-v5-c-avatar--m-dark--BorderWidth
1px
.pf-v5-c-avatar.pf-m-light--pf-v5-c-avatar--BorderColor
#d2d2d2
.pf-v5-c-avatar.pf-m-light--pf-v5-c-avatar--BorderWidth
1px
.pf-v5-c-avatar.pf-m-dark--pf-v5-c-avatar--BorderColor
#4f5255
.pf-v5-c-avatar.pf-m-dark--pf-v5-c-avatar--BorderWidth
1px
.pf-v5-c-avatar.pf-m-sm--pf-v5-c-avatar--Width
1.5rem
.pf-v5-c-avatar.pf-m-sm--pf-v5-c-avatar--Height
1.5rem
.pf-v5-c-avatar.pf-m-md--pf-v5-c-avatar--Width
2.25rem
.pf-v5-c-avatar.pf-m-md--pf-v5-c-avatar--Height
2.25rem
.pf-v5-c-avatar.pf-m-lg--pf-v5-c-avatar--Width
4.5rem
.pf-v5-c-avatar.pf-m-lg--pf-v5-c-avatar--Height
4.5rem
.pf-v5-c-avatar.pf-m-xl--pf-v5-c-avatar--Width
8rem
.pf-v5-c-avatar.pf-m-xl--pf-v5-c-avatar--Height
8rem

View source on GitHub