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

  • 0.1.0
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

react-nice-avatar

Version npm download

react-nice-avatar

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 myConfig = genConfig(optObj?)
  1. Render the component with config and width / height
<Avatar style={{ width: '8rem', height: '8rem' }} {...config} />

or using className to set the width / height

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

Options

The options can be passed into genConfig or on React props

keytypedefaultaccept
classNamestring
styleobject
shapestringcirclecircle, rounded, square
sexstringman, woman
faceColorstring
earSizestringsmall, big
hairColorstring
hairStylestringnormal, thick, mohawk, womanLong, womanShort
eyeStylestringcircle, oval, smile
noseStylestringshort, long, round
mouthStylestringlaugh, smile, peace
shirtStylestringhoody, short, polo
shirtColorstring
bgColorstring

License

MIT

Keywords

FAQs

Package last updated on 29 May 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