Avatar
Examples
To render an avatar, apply the class chi-avatar
to a div element and place an image inside.
Base #
Icon Avatars #
Icon avatars can be used when an image is not available.
To use, wrap any Chi icon with chi-avatar
.
Initial Avatars #
Initial avatars can also be used when an image is not available.
They are more versatile than icon avatars and support up to two letters.
Text utility classes such as -text--uppercase
, -text--lowercase
,
and -text--capitalized
can be applied to force specific casing.
Customizations
Both icon and initial avatars support Chi colors.
To color an icon, apply any of the following color classes: -grey
, -red
,
-pink
, -purple
, -indigo
, -navy
, -blue
,
-teal
, -green
, -yellow
, -orange
,
-secondary
, -primary
grey
red
pink
purple
indigo
navy
blue
cyan
teal
green
yellow
orange
primary
grey
red
pink
purple
indigo
navy
blue
cyan
teal
green
yellow
orange
primary
Light and transparent background #
Both icon and initial avatars support light and transparent versions for dark backgrounds.
All three avatar styles support a full spectrum of sizes: -xs
, -sm
,
-sm--2
, -sm--3
, -md
, -lg
, -xl
, -xxl
.
-md
is the default size.
xs
sm
sm--2
sm--3
md
lg
xl
xxl
xs
sm
sm--2
sm--3
md
lg
xl
xxl
xs
sm
sm--2
sm--3
md
lg
xl
xxl
Avatar Groups #
Use avatar groups to group multiple avatars or add descriptive text such as a users name.
Render an avatar group by wrapping an avatar in the class chi-avatar-group
.