Skip to content
PatternFly logo

Avatar

Examples

Basic

Avatar image

Bordered - light

Avatar image light

Bordered - dark

Avatar image dark

Small

Avatar image small

Medium

Avatar image medium

Large

Avatar image large

Extra large

Avatar image extra large

Documentation

Overview

The avatar component provides a default SVG icon. If an image is used it should be 36px by 36px.

Accessibility

Attribute
Applied to
Outcome
alt
.pf-c-avatar
The alt attribute describes the appearance and function of the avatar image. Required

Usage

Class
Applied to
Outcome
.pf-c-avatar
<img>
Initiates an avatar image. Required
.pf-m-light
.pf-c-avatar
Modifies an avatar for use against a light background.
.pf-m-dark
.pf-c-avatar
Modifies an avatar for use against a dark background.
.pf-m-sm{-on-[breakpoint]}
.pf-c-avatar
Modifies an avatar to be small on an optional breakpoint.
.pf-m-md{-on-[breakpoint]}
.pf-c-avatar
Modifies an avatar to be medium on an optional breakpoint. Note: This is the default size.
.pf-m-lg{-on-[breakpoint]}
.pf-c-avatar
Modifies an avatar to be large on an optional breakpoint.
.pf-m-xl{-on-[breakpoint]}
.pf-c-avatar
Modifies an avatar to be extra large on an optional breakpoint.

CSS variables

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

View source on GitHub