New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-nice-avatar

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-nice-avatar

Beautiful default avatar for your users

  • 1.0.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.5K
decreased by-42.9%
Maintainers
1
Weekly downloads
 
Created
Source

react-nice-avatar

Version npm download

imagewall

Online demo

Assets

Installation

npm install react-nice-avatar

or

yarn add react-nice-avatar

Usage

  1. Import the component
import Avatar, { genConfig } from 'react-nice-avatar'
  1. Generate random config, the config can be saved into your database to use later
const config = genConfig(AvatarConfig?)
  1. Render the component with specific width / height and configuration
<Avatar style={{ width: '8rem', height: '8rem' }} {...config} />

or

<Avatar className="w-32 h-32" {...config} />

Options

The options can be passed into genConfig or as React props

keytypedefaultaccepttips
idstringOnly for React Props
classNamestringOnly for React Props
styleobjectOnly for React Props
shapestringcirclecircle, rounded, squareOnly for React Props
sexstringman, woman
faceColorstring
earSizestringsmall, big
hairColorstring
hairStylestringnormal, thick, mohawk, womanLong, womanShort
eyeStylestringcircle, oval, smile
glassesStylestringnone, round, squareUsually is none
noseStylestringshort, long, round
mouthStylestringlaugh, smile, peace
shirtStylestringhoody, short, polo
shirtColorstring
bgColorstring

Development

  1. $ git clone git@github.com:chilllab/react-nice-avatar.git: Clone the codebase
  2. $ yarn or $ npm install: Install dependencies
  3. $ make dev: Star the server for the demo
  4. $ open http://localhost:5555: Open the browser to reivew the demo
  5. Edit the files inside /src

License

MIT

Keywords

FAQs

Package last updated on 02 Jun 2021

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc