
Product
Introducing Socket Firewall Enterprise: Flexible, Configurable Protection for Modern Package Ecosystems
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.
@synerise/ds-avatar
Advanced tools
An avatar is an object used to represent a particular person in the application. The avatar is usually accompanied by the status (for example, Active, Inactive, Blocked) identifying the availability of any person in the application.
![]()
Avatars are forms of proportional sides. Their shape is placed in a square or a circle.
![]()
The shape of avatars can be both circular or square (make sure each corner has a 3px radius).
Avatars have 4 sizes:
The S-sized avatars contain the S-sized icons of the Standard icons set. The M, L and XL sizes contain the M-sized icons.
<div style={{ 'display': 'flex', 'justifyContent': 'space-between' }}>
<Avatar size="small" backgroundColor="blue" backgroundColorHue="600">JJ</Avatar>
<Avatar size="medium" backgroundColor="blue" backgroundColorHue="600">JJ</Avatar>
<Avatar size="large" backgroundColor="blue" backgroundColorHue="600">JJ</Avatar>
<Avatar size="extraLarge" backgroundColor="blue" backgroundColorHue="600">JJ</Avatar>
</div>
We divide avatars into three types. Every type has its own use case. If a customer hasn't uploaded an image, the application automatically displays an avatar with the initials of the customer.
Types of avatars:
![]()
<div style={{ 'display': 'flex', 'justifyContent': 'space-between' }}>
<Avatar tooltip={{name: 'Jan Janowski', email: 'jj@test.pl'}} shape="square" size="medium" backgroundColor="blue" backgroundColorHue="600">JJ</Avatar>
<Avatar tooltip={{name: 'Jan Janowski', email: 'jj@test.pl'}} shape="cirlce" size="medium" backgroundColor="blue" backgroundColorHue="600">JJ</Avatar>
<Avatar tooltip={{name: 'Jan Janowski', email: 'jj@test.pl'}} src="https://www.w3schools.com/howto/img_avatar.png" size="large" backgroundColor="blue" backgroundColorHue="600">JJ</Avatar>
<Avatar tooltip={{name: 'Jan Janowski', email: 'jj@test.pl'}} src="https://www.w3schools.com/howto/img_avatar.png" shape="square" size="extraLarge" backgroundColor="blue" backgroundColorHue="600">JJ</Avatar>
</div>
We can present avatars as a single entity or in a group.
![]()
<div style={{ 'display': 'flex', 'justifyContent': 'space-between' }}>
<Avatar tooltip={{name: 'Jan Janowski', email: 'jj@test.pl'}} size="small" backgroundColor="blue" backgroundColorHue="600">JJ</Avatar>
<Avatar tooltip={{name: 'Jan Janowski', email: 'jj@test.pl'}} size="medium" backgroundColor="blue" backgroundColorHue="600">JJ</Avatar>
<Avatar tooltip={{name: 'Jan Janowski', email: 'jj@test.pl'}} size="large" backgroundColor="blue" backgroundColorHue="600">JJ</Avatar>
<Avatar tooltip={{name: 'Jan Janowski', email: 'jj@test.pl'}} size="extraLarge" backgroundColor="blue" backgroundColorHue="600">JJ</Avatar>
</div>
import Icon, { FileM } from "@synerise/ds-icon";
<div style={{ 'display': 'flex', 'justifyContent': 'space-between' }}>
<Avatar tooltip={{name: 'Jan Janowski', email: 'jj@test.pl'}} shape="square" size="medium" backgroundColor="blue" backgroundColorHue="600">JJ</Avatar>
<Avatar tooltip={{name: 'Jan Janowski', email: 'jj@test.pl'}} shape="cirlce" size="medium" backgroundColor="blue" backgroundColorHue="600">JJ</Avatar>
<Avatar tooltip={{name: 'Jan Janowski', email: 'jj@test.pl'}} iconComponent={<Icon component={<FileM />} color={"white"} />} size="large" backgroundColor="blue" backgroundColorHue="600">JJ</Avatar>
<Avatar tooltip={{name: 'Jan Janowski', email: 'jj@test.pl'}} src="https://www.w3schools.com/howto/img_avatar.png" shape="square" size="extraLarge" backgroundColor="blue" backgroundColorHue="600">JJ</Avatar>
</div>
npm i @synerise/ds-avatar
or
yarn add @synerise/ds-avatar
import Avatar from '@synerise/ds-avatar';
<Avatar shape={'circle'} backgroundColor={'grey'} size={20} />;
| Property | Description | Type | Default |
|---|---|---|---|
| backgroundColor | Background color of the avatar | green / grey / yellow / blue / pink/ mars/ orange/ fern/ cyan/ purple / violet | orange |
| backgroundColorHue | Background color hue of the avatar | 900 / 800 / 700 / 600 / 500 / 400 / 300 / 200 / 100 / 050 | 400 |
| disabled | Determines if avatar is disabled | boolean | false |
| hasStatus | Aligns a badge with the avatar | boolean | false |
| iconComponent | Provides a custom component as a child. If both are provided, the prop icon has a greater priority | React.ReactNode | - |
| iconScale | Auto scale icon to sizes | boolean | true |
| shape | Shape of the avatar | circle / square | circle |
| size | Size of the avatar | small / medium / large / extraLarge | medium |
| src | Image source path | string | - |
| tooltip | Tooltip text displayed on hover | { name: string, email: string } | - |
A variant that renders full standard user avatar, with expected tooltip etc.
This component should be used as user/client representation.
import { UserAvatar } from '@synerise/ds-avatar';
<UserAvatar user={{
firstName: 'John',
lastName: 'Doe',
email: 'john.doe@synerise.com',
avatar: 'http://image.url/image.jpg',
}} />
| Property | Description | Type | Default |
|---|---|---|---|
| user | User information | { firstName: string, lastName: string, email: string, avatar: string } | - |
| backgroundColor | Background color of the avatar | auto / green / grey / yellow / blue / pink/ mars/ orange/ fern/ cyan/ purple / violet | auto |
| badgeStatus | Badge status | active / error / warning | - |
| disabled | Determines if avatar is disabled | boolean | false |
| iconComponent | Replace default user icon | React.ReactNode | - |
| size | Size of the avatar | small / medium / large / extraLarge | medium |
| tooltip | Change default tooltip text displayed on hover | { title: string, description: string, status: string } / false | - |
A variant that renders full standard object avatar.
This component should be used for ex. in products, services, etc.
import { ObjectAvatar } from '@synerise/ds-avatar';
<ObjectAvatar object={{
name: 'Product name',
description: 'Nice description',
status: 'API',
}} />
| Property | Description | Type | Default | |
|---|---|---|---|---|
| object | Object information | { name: string, description: string, status: string, avatar: string } | - | |
| color | Background color of the avatar | green / grey / yellow / blue / pink/ mars/ orange/ fern/ cyan/ purple / violet | grey | |
| backgroundColor | Background color of the avatar | auto / green / grey / yellow / blue / pink/ mars/ orange/ fern/ cyan/ purple / violet | auto | |
| badgeStatus | Badge status | active / error / warning | - | |
| disabled | Determines if avatar is disabled | boolean | false | |
| iconComponent | Replace default user icon | React.ReactNode | - | |
| size | Size of the avatar | small / medium / large / extraLarge | medium | |
| tooltip | Change default tooltip text displayed on hover | { title: string, description: string, status: string } / false | - |
FAQs
Avatar UI Component for the Synerise Design System
The npm package @synerise/ds-avatar receives a total of 753 weekly downloads. As such, @synerise/ds-avatar popularity was classified as not popular.
We found that @synerise/ds-avatar demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.

Security News
Open source dashboard CNAPulse tracks CVE Numbering Authorities’ publishing activity, highlighting trends and transparency across the CVE ecosystem.

Product
Detect malware, unsafe data flows, and license issues in GitHub Actions with Socket’s new workflow scanning support.