Ready to take your JavaScript development to the next level? Meet npm Enterprise - the ultimate in enterprise JavaScript. Learn more »

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)

install

npm i identicons-react

Downloadsweekly downloads

54

version

0.1.0

license

MIT

last publish

collaborators

  • avatar
Report a vulnerability