React Random Squares Avatar
A simple react component that creates a Slack like avatar.
Demo & Examples
To build and test locally, run:
npm install npm test npm run testonly npm run lint npm run prepublish
You can also use the standalone build by including
dist/index.js in your page. If you use this, make sure you have already included React, and it is available as a global variable.
npm install react-random-squares-avatar --save
If no props are supplied then the default height and width are 100px and the rotation will be a random 10 digit number in the range of 10 degrees to 80 degrees inclusive.
< ReactRandomSquaresAvatar />
The props height and width set the avatars dimensions and the rotate value can be either 0, or a 10 digit number in the range of 10 degrees to 80 degrees inclusive.
<ReactRandomSquaresAvatar height="200" width="200" rotate="0" /> <ReactRandomSquaresAvatar height="200" width="200" rotate="80" />
Inspired by this codepen
http://codepen.io/richardj/pen/oxvrwr by @richardj