identicons-react

0.1.0 • Public • Published

identicons-react

Simple module to create SVG identicons like the ones used by GitHub.

Identicon

Installing

npm install identicons-react --save

Usage

<div id="identicon"></div>

Plain JavaScript

var React = require('react')
var ReactDOM = require('react-dom')
var Identicons = require('identicons-react')
 
var mountNode = document.getElementById('identicon')
ReactDOM.render(React.createElement(Identicons, { id: 'username@example.com', width: 200, size: 5 }), mountNode)

Using JSX

var React = require('react')
var ReactDOM = require('react-dom')
var Identicons = require('identicons-react')
 
var mountNode = document.getElementById('identicon')
ReactDOM.render(<Identicons id='username@example.com' width={200} size={5} />, mountNode)

Readme

Keywords

Package Sidebar

Install

npm i identicons-react

Weekly Downloads

3

Version

0.1.0

License

MIT

Last publish

Collaborators

  • gimenete