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

react-useravatar

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-useravatar

Create a unique avatar by using username as background color

1.1.2
latest
Source
npm
Version published
Maintainers
1
Created
Source

react-user-avatar

Install

Run npm i react-useravatar --save

alt UserAvatar demo

Props

  • username string (required)

  • size integer : Default is 100px

  • onClick function : Event when user click on avatar

  • textColor string : Username text color, default #ffffff

  • borderStyle boolean : coming soon ...

Static

  • getColor function : Get color with username, ex UserAvatar.getColor("bltnico") return 044FD1

Dev and test

Install babel by npm install

And compile with babel src --out-dir lib

Babel .babelrc use es2015 and react compiler

Keywords

react-component

FAQs

Package last updated on 22 Jan 2016

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