BaseAvatar

Circle avatar sizes

Avatars can have different shapes. The following example shows avatars using the full shape. Avatars can also be displayed as groups, using the <BaseAvatarGroup> component.

Default shape of all <BaseAvatar> can be set in your .app/app.config.ts.
Show code

Curved avatar sizes

Avatars can have different shapes. The following example shows avatars using the curved shape. Use the shape prop to change the shape of the avatar.

Show code

Avatar circle dot

Avatars can have status indicators. Indicators positionning vary depending on the shape of the avatar. Use the dot prop to display a status indicator.

Show code

Avatar curved dot

Avatars can have status indicators. Indicators positionning vary depending on the shape of the avatar. Use the dot prop to display a status indicator.

Show code

Avatar circle badge

Avatars can have image badges. Badges can be used to display a skill, a flag, an icon or any relevant information. Use the src-badge prop to display a badge.

Show code

Avatar curved badge

Avatars can have image badges. Badges can be used to display a skill, a flag, an icon or any relevant information. Use the src-badge prop to display a badge.

Show code

Fake avatar circle

Sometimes, you need to display a placeholder avatar. When an image is not provided, the component defaults to the fake mode, using color and text instead of an image.

CT
CT
CT
CT
CT
CT
CT
CT
Show code

Fake avatar curved

Sometimes, you need to display a placeholder avatar. When an image is not provided, the component defaults to the fake mode, using color and text instead of an image.

CT
CT
CT
CT
CT
CT
CT
CT
Show code

Fake circle badge

Fake avatars withstand the same props as regular avatars. You can also use badges and indicators on fake avatars using the same properties.

CT
CT
CT
CT
CT
CT
CT
CT
Show code

Fake curved badge

Fake avatars withstand the same props as regular avatars. You can also use badges and indicators on fake avatars using the same properties.

CT
CT
CT
CT
CT
CT
CT
CT
Show code

Fake circle colors

Fake avatars background and text color can be customized using Tailwind CSS bg-* and text-* utilities. Alternatively, you can use the apollux getRandomColor() utility function to generate a random color.

CT
CT
CT
CT
CT
CT
CT
CT
CT
CT
CT
CT
CT
CT
CT
CT
CT
CT
CT
Show code

Fake curved colors

Fake avatars background and text color can be customized using Tailwind CSS bg-* and text-* utilities. Alternatively, you can use the apollux getRandomColor() utility function to generate a random color.

CT
CT
CT
CT
CT
CT
CT
CT
CT
CT
CT
CT
CT
CT
CT
CT
CT
CT
CT
Show code

SVG Masks

Avatars can be displayed using SVG masks, bringing fancier shapes to your UI. Keep in mind that the mask prop is only available for the straight shape.

Using svg masks will hide any overflow from your avatar, making it unable to properly display badges, indicators or tooltips.
Show code
size
The size of the image.
Show example
shape
The shape of the image.
Show example
text
The text to display below the image.
Show example
dot
Whether to display a dot on top of the image, or the color of the dot.
Show example
src
The URL of the image to display.
Show example
src-dark
The URL of a dark version of the image to display when the component is in dark mode.
Show example
badge-src
The URL of a badge to display on top of the image.
Show example
mask
Applies an svg mask from the available presets. (needs shape to be set to `straight`).
Show example
ring
Whether to display a ring around the image .
Show example
#default
Show example
#badge
Show example