GithubHelp home page GithubHelp logo

isabella232 / ethereum-blockies-base64 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mycryptohq/ethereum-blockies-base64

0.0 0.0 0.0 156 KB

A tiny library for generating blocky identicons as base64 encoded PNGs.

Home Page: https://www.npmjs.com/package/ethereum-blockies-base64

HTML 5.98% JavaScript 94.02%

ethereum-blockies-base64's Introduction

Ethereum Blockies Base64

A tiny library for generating blocky identicons as base64 encoded PNGs.

Sample of generated blockies

See a live demo of it in action

Install

# NPM
npm install --save ethereum-blockies-base64

# Yarn
yarn add ethereum-blockies-base64

Use

Vanilla JS

import makeBlockie from 'ethereum-blockies-base64';

const img = new Image() ;
img.src = makeBlockie('0x7cB57B5A97eAbe94205C07890BE4c1aD31E486A8');

document.body.appendChild(img);

React

import React from 'react';
import makeBlockie from 'ethereum-blockies-base64';

class Blockie extends React.Component {
  render() {
    return <img src={makeBlockie(this.props.address)}/>
  }
}

Note: In a real setting, we recommend saving to state and re-making the blockie on prop change for better re-render performance.

License

MIT

ethereum-blockies-base64's People

Contributors

dternyak avatar skubakdj avatar wbobeirne avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.