Skip to content

Yet another tiny identicon library. Get unique identicon as SVG

License

Notifications You must be signed in to change notification settings

appbak3r/sushi-identicon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sushi Identicon

Yet another tiny identicon library.

Get unique identicon as SVG.

Example

Usage

Install

npm install @appbak3r/sushi-identicon

Or with yarn

yarn add @appbak3r/sushi-identicon

Output as a SVG Element

import { generateIdentIcon } from "@appbak3r/sushi-identicon";

document.body.appendChild(generateIdentIcon("hash"));

Output as a string

import { generateIdentIcon } from "@appbak3r/sushi-identicon";

export const App = () => {
  const svgString = generateIdentIcon("hash", true);

  return <div dangerouslySetInnerHTML={{ __html: svgString }} />;
};

License

Distributed under the MIT License. See LICENSE for more information.