Example of Default in ASP.NET MVC Avatar Control

This sample demonstrates the default avatar and circle avatar for which the .e-avatar and .e-avatar-circle class needs to be added respectively to the target element.

DEMO
SOURCE
Default
Circle

The avatar is developed in pure CSS which is used to represent the profile picture, initials, or icons in a presentable way. It comes with two different shapes, they are listed below.

  • Default Avatar - To apply default avatar add .e-avatar class to the target element.
  • Circle Avatar - To apply circle avatar add .e-avatar-circle class to the target element.

The avatar comes with 5 different sizes, which can be applied through modifier classes. They are listed below.

  • xSmall Avatar - The xSmall avatar can be applied by adding the .e-avatar-xsmall.
  • Small Avatar - The Small avatar can be applied by adding the .e-avatar-small.
  • Default Avatar - The Default avatar can be applied by adding the .e-avatar, No additional class needed for this.
  • Large Avatar - The Large avatar can be applied by adding the .e-avatar-large.
  • xLarge Avatar - The xLarge avatar can be applied by adding the .e-avatar-xlarge.

The .e-avatar is the main class which needs to be included in an element to use any of the other avatar features.

The images can be added in two different way to the avatar.

  • Using CSS background property on the avatar element, which doesn’t require any additional element.
  • Using image tag, the image tag needs to be wrapped by the avatar element.
Transform your ASP.NET MVC web apps today with Syncfusion ASP.NET MVC components
85+ high-performance and responsive UI components
Dedicated support
Hassle-free licensing
TRY IT FOR FREE
opens in a new tab