Skip to content

Jazzy deterministic identicons for a more entertaining future

License

Notifications You must be signed in to change notification settings

MetaMask/jazzicon

This branch is 18 commits ahead of, 2 commits behind danfinlay/jazzicon:master.

Folders and files

NameName
Last commit message
Last commit date
Feb 28, 2025
May 22, 2023
May 22, 2023
Nov 14, 2023
Aug 27, 2020
May 26, 2023
May 11, 2016
May 11, 2016
May 26, 2023
Mar 19, 2025
Mar 19, 2025
Mar 19, 2025
Oct 27, 2016

Repository files navigation

@metamask/jazzicon

⭐️ View demo

Say goodbye to boring, blocky identicons that look like they came out of the '70s and replace them with jazzy, colorful collages that more likely came out of the '80s!

Installation

npm install @metamask/jazzicon

Usage

This library exports a single function which:

  • takes two numbers, the diameter of the icon in pixels and a seed for randomly generating patterns
  • gives you back a DOM element representing the icon to use as you wish

For example:

const jazzicon = require('@metamask/jazzicon');

// Generate 60 icons
for (let i = 0; i < 60; i++) {
  // Use 100px as the diameter for each icon and a random number for the seed
  const icon = jazzicon(100, Math.round(Math.random() * 10000000));
  // Add the new icon to the page
  document.body.appendChild(icon);
}

Generating the demo

You can generate and run the demo locally by running npm run build-demo, then opening demo-build/index.html in your browser.

About

Jazzy deterministic identicons for a more entertaining future

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

No packages published

Languages

  • JavaScript 100.0%