A React component that deterministically generates robot icons based on the given input. See example code below.
Made with create-react-library
npm install --save @digitalungdom/bot-identiconimport React, { Component } from 'react'
import HashedBotIdenticon from '@digitalungdom/bot-identicon'
class Example extends Component {
render() {
return <HashedBotIdenticon identifier='john von neumann' size={500} />
}
}| Name | Type | Default | Description |
|---|---|---|---|
size |
'inherit' | number |
200 |
size of the icon |
background |
boolean |
false |
display background |
Inherits BaseBotIdenticonProps.
| Name | Type | Default | Description |
|---|---|---|---|
color |
[h: number, s: number, l: number] |
[216, 81, 51] |
color in HSL-values |
face |
Face |
normal |
face of the identicon |
Inherits props for BotIdenticonProps. To override the hashed values, one can provide a face and/or color property.
identifier- string that will deterministically create colors and a face with md5
One of the following values
'cool''evil''kiss''incognito''normal''laughing''happyEyes''heartEyes''celebrate'
Crypto-js is needed to hash the identifier.
The original robot design is by @charlesmaddock and @digitalungdom-se. The code for this repo was originally developed by @adelhult. The transitition to TypeScript and publishing as a reusable component was made by @nautman.
MIT © digitalungdom-se