Trusted by the world’s leading 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.
Initials avatar
Represent users’ 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 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.
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.
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>
);
}
}Not sure how to create your first React Avatar? Our documentation can help.
I’d love to read it nowDiscover Syncfusion’s Complete React Component Ecosystem
Explore over 145+ React UI components featuring established, production-ready controls and the latest pure React components built natively for modern web app development.
-
React Components
-
Pure React Components
-
SMART COMPONENTSGRIDSDATA VISUALIZATIONDROPDOWNSFILE VIEWERS & EDITORSBUTTONSINTERACTIVE CHATINPUTSNAVIGATIONFORMSNOTIFICATIONS
-
GRIDSDATA VISUALIZATIONNAVIGATIONINPUTS
Our Customers Love Us
Here are some of their experiences.
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.