react-initicon

A lightweight React library to generate dynamic Initial Icons (similar to Identicons).

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
react-initicon
0.3.06 years ago8 years agoMinified + gzip package size for react-initicon in KB

Readme

React Initicon
Initial Icons for React

RE A C T
IN IT IC ON
Initicon Demo

Usage

<Initicon
  size={100}
  text="Test Account"
  seed={23}
  single={false}
/>

Browser

<script src="https://rawgit.com/ccm-innovation/react-initicon/master/initicon.min.js"></script>

Installation

$ npm install --save react-initicon

Node.js

var Initicon = require('react-initicon');

React Native

var Initicon = require('react-initicon/native');

Props

|Key |Type |Description | |--- |--- |--- | |text|String|The text to use to make initials| |size|Number|The pixel height / width of the icon| |seed|Number|Number uses to seed the random hue generator| |color|String|Override the background color with any valid CSS color value| |single|Boolean|Whether to only use a single initial or now| |saturation|String|Specify the hsl saturation value| |brightness|String|Specify the hsl lightness (brightness) value|

Contributing

Modify the files in the src folder. Before committing, update the build by running npm run build. This will babelify the code and then compress into initicon.min.js for a browser version.