Appearance

The Avatar allows you to set different renderings of its content.

The available configurations are:

  • Image avatarBy passing the imageSrc property.
  • Initials avatarBy setting the initials property to any given string.
  • Icon avatarBy passing an icon name to the icon property.

The following example demonstrates all appearance options in action.

Example
View Source
Edit In Stackblitz  
Change Theme:

Theme Color

The Avatar allows you to specify predefined theme colors.The theme color will be applied as background and border color, while also amending the text color accordingly.

The available themeColor values are:

  • primary (Default)Applies coloring based on primary theme color.
  • secondaryApplies coloring based on secondary theme color.
  • tertiary Applies coloring based on tertiary theme color.
  • inherit Applies inherited coloring value.
  • infoApplies coloring based on info theme color.
  • success Applies coloring based on success theme color.
  • warning Applies coloring based on warning theme color.
  • error Applies coloring based on error theme color.
  • dark Applies coloring based on dark theme color.
  • light Applies coloring based on light theme color.
  • inverse Applies coloring based on inverted theme color.
Example
View Source
Edit In Stackblitz  
Change Theme:

Shape

Avatars can be rendered in a different shape by setting the shape property.

The available shape values are:

  • circleRenders a circle shape avatar.
  • roundedRenders an avatar with rounded borders.
  • square(Default)Renders a square shape avatar.
  • rectangleRenders a rectangle shape avatar.
Example
View Source
Edit In Stackblitz  
Change Theme:

Size

The Avatar allows you to set predefined or custom sizes. To specify a predefined size, set the size property.

The available size values are:

  • small
  • medium (Default)
  • large

To specify a custom avatar size, use the width and height properties.

Example
View Source
Edit In Stackblitz  
Change Theme:

Fill

The Avatar enables you to set styling options and create solid or outline avatars by setting the fill property.

The available fill values are:

  • solid (Default)
  • outline

An additional border around the content of an outline avatar can be rendered by setting the border property to true.

Example
View Source
Edit In Stackblitz  
Change Theme:

Border

The Avatar allows you to specify whether or not to render an additional border around its content by using the border property. By default, border is set to false.

Custom Content

You can also define any custom content as an avatar between <kendo-avatar> tags.

In this article

Not finding the help you need?