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
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. It 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 users profiles like those in applications such as Gmail, Outlook, GitHub, and StackOverflow.

React profile or image avatar.


React initials avatar.

Initials avatar

Represent users’ initials in different sizes.


Text or word avatar

Create word or text avatars from user names.

React text or word avatar.


React Avatar media types.

Media types

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


Shapes and sizes

The React Avatar component can be square or circular and 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.

React Avatar shapes and sizes.


React Avatar UI customization.

UI customization

Completely customize the avatar attributes, like dimensions and colors.


Avatar generator

In applications like Gmail, StackOverflow, GitHub, 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 the React Avatar component with layout controls, specifically ListView and Card, to achieve different applications, such as a mobile contact list or Outlook-like appearance. Integrate it with the Badge component to show a notification count like in email applications.

React Avatar integration with other controls.


Other supported frameworks

The Avatar control is also available in Vue, Angular, and JavaScript frameworks. Check out the Avatar different 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