1.2.0 • Published 2 years ago

animal-avatar-generator v1.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Generate SVG avatars on client side from a string seed. As long as the same version of the library is used it always returns the same avatar for the corresponding seed.

Live example

Using npm:

$ npm install animal-avatar-generator --save

or using yarn:

$ yarn add animal-avatar-generator
import avatar from 'animal-avatar-generator'

const svg = avatar('your custom seed', { size: 200 })
document.getElementById('avatar').innerHTML = svg
NameTypeDescriptionDefault
sizenumber or stringAvatar size in pixels or css property150 or '75%'
roundbooleanUse round or rectangle shapetrue
blackoutbooleanUse blackout for right side of an avatartrue
avatarColorsstring[]Palette for avatar colors['#d7b89c', '#b18272','#ec8a90','#a1Ac88','#99c9bd','#50c8c6']
backgroundColorsstring[]Palette for background colors['#fcf7d1', '#ece2e1','#e4e3cd','#c4ddd6','#b5f4bc']

Missing a configuration? Raise an issue.

1.2.0

2 years ago

1.1.0

3 years ago

1.0.5

3 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago

0.0.14

4 years ago

0.0.13

4 years ago

0.0.12

4 years ago

0.0.11

4 years ago

0.0.10

4 years ago

0.0.9

4 years ago

0.0.8

4 years ago

0.0.7

4 years ago

0.0.6

4 years ago

0.0.5

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago