We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Trusted by the world’s leading companies

Syncfusion Trusted Companies

Overview

React Avatar is a pure CSS component used to add initials, icons, or images representing people or objects in different shapes and sizes. The Avatar control can be easily integrated with ListView, Badge, Card, and other container components.


Profile or image avatar

The React Avatar component supports various types of images to represent user profile images like those in applications such as Mail, Outlook, GitHub, and StackOverflow.


Initial avatar

Represents a user’s initials in different sizes.


Text or word avatar

Create word or text avatars from user names.


Media types

The avatar supports well-known media types, icons, SVG, font icons, and text.

Shapes and sizes

The React Avatar component can be either square or circular in one of five sizes: extra small, small, medium, large, and extra large. By default, avatars are created in a square shape with a medium size.


UI customization

Completely customize the avatar attributes, like dimensions and colors.


Avatar generator

In applications like Gmail, StackOverflow, GitHub, and others, user avatars are represented using Identicons, which are visual representations of hash values of IP addresses.

Use the Syncfusion React Avatar and Badge components to integrate dynamically generated Identicons by following the instructions in this blog:


Integration with other components

Easily integrate React Avatar component with layout controls, specifically ListView and Card, to achieve different UIs, such as mobile contacts, Mail-like, Outlook-like, and more. Integrate it with the Badge component to represent a notification count like in email applications.


Other supported frameworks

The Avatar control is also available in Vue, Angular, and JavaScript frameworks. Check out the different Avatar platforms from the links below:


React Avatar code example

Easily get started with the React Avatar using a few simple lines of TSX code example as demonstrated below. Also explore our React Avatar example that shows you how to render and configure a Avatar in React.

import * as ReactDOM from 'react-dom';
import * as React from 'react';
import { SampleBase } from '../common/sample-base';
import './default.css';

// tslint:disable:max-line-length

// *  Sample for CSS avatar component

export class Default extends SampleBase<{}, {}> {

render() {
    return (
         <div className='control-pane'>
            <div className="sample_container avatar-default">
                <div className="avatar-block">
                    <div className="e-card e-avatar-showcase">
                        <div className="e-card-content">
                            {/* <!-- xSmall Avatar--> */}
                            <div className="e-avatar e-avatar-xsmall image"></div>
                            {/* <!-- Small Avatar--> */}
                            <div className="e-avatar e-avatar-small image"></div>
                            {/* <!-- Avatar--> */}
                            <div className="e-avatar image"></div>
                            {/* <!-- Large Avatar--> */}
                            <div className="e-avatar e-avatar-large image"></div>
                            {/* <!-- xLarge Avatar--> */}
                            <div className="e-avatar e-avatar-xlarge image"></div>
                        </div>
                        <div className="e-card-content">
                            <div>Default</div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    );
}
}


85+ REACT UI COMPONENTS

Our Customers Love Us

Having an excellent set of tools and a great support team, Syncfusion reduces customers’ development time.
Here are some of their experiences.

Rated by users across the globe

Transform your applications today by downloading our free evaluation version
Download Free Trial No credit card required.

Awards

Greatness—it’s one thing to say you have it, but it means more when others recognize it. Syncfusion is proud to hold the following industry awards.

Up arrow icon
Live Chat Icon For mobile