🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis
Socket
Book a DemoInstallSign in
Socket

@synerise/ds-avatar

Package Overview
Dependencies
Maintainers
1
Versions
367
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@synerise/ds-avatar

Avatar UI Component for the Synerise Design System

npmnpm
Version
0.4.3
Version published
Weekly downloads
10
-90.83%
Maintainers
1
Weekly downloads
 
Created
Source

id: avatar title: Avatar

An avatar is an icon that represents a particular person, but, the avatar has more applications in the Synerise platform. It is used as:

  • Human-related icon
  • Object icon

Inspired by Ant Design Avatar

When to use it

  • To represent a platform user (for example, to indicate the author of the campaign).
  • To represent a customer (for example, on a list of customers, on a customer card).
  • To represent the type of the item on a list (for example, a campaign, an analysis).

Component anatomy

This is a complex component, which means it may consist of more components, for example:

Installation

npm i @synerise/ds-avatar
or
yarn add @synerise/ds-avatar

Usage

import Avatar from '@synerise/ds-avatar'

<Avatar
  shape={circle}
  backgroundColor={grey}
  size={20}
/>

Badge sizes

Avatar types

Avatar statuses

API

PropertyDescriptionTypeDefault
shapeThe shape of the avatarcircle \ squarecircle
sizeThe size of the avatarnumber \ string: large small defaultdefault
srcThe URL of the image for the avatarstring-
srcSetThe list of sources to use for different screen resolutionsstring-
altThe alternate text for the imagestring-
onErrorThe handler for image load errors, return false to prevent a default fallback behavior() => boolean-
hasStatusAligns badge with the avatarbooleanfalse
iconComponentAllows to provide a custom component as a child. The prop icon has greater priority if both are providedReactNode
backgroundColorBackground color of the avatar: red/green/grey/yellow/blue/pink/mars/orange/fern/cyan/purple/violetstring
backgroundColorHueBackground color hue of the avatar: 050/100/200/300/400/500/600/700/800/900string400
disabledDefines if the avatar is diabledbooleanfalse

FAQs

Package last updated on 12 Mar 2020

Did you know?

Socket

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.

Install

Related posts