https://github.com/clydedz/getavataaars-npm
Generate an avatar by mixing-and-matching various elements.
https://github.com/clydedz/getavataaars-npm
avataaars avataaars-generator avatar-generator avatars getavataaars mix-and-match npm npm-package
Last synced: 7 months ago
JSON representation
Generate an avatar by mixing-and-matching various elements.
- Host: GitHub
- URL: https://github.com/clydedz/getavataaars-npm
- Owner: ClydeDz
- License: mit
- Created: 2020-12-05T08:53:50.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2020-12-06T00:59:49.000Z (over 4 years ago)
- Last Synced: 2024-05-01T16:41:07.035Z (about 1 year ago)
- Topics: avataaars, avataaars-generator, avatar-generator, avatars, getavataaars, mix-and-match, npm, npm-package
- Language: JavaScript
- Homepage: https://bit.ly/getavataaars
- Size: 71.3 KB
- Stars: 6
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Get Avataaars
Generate an avatar by mixing-and-matching various elements.[](https://clydedsouza.visualstudio.com/Get%20Avataaars%20npm/_build/latest?definitionId=31)
[](https://clydedsouza.visualstudio.com/Get%20Avataaars%20npm/_build?definitionId=31)
[](https://clydedsouza.visualstudio.com/Get%20Avataaars%20npm/_build/latest?definitionId=31)
[](https://sonarcloud.io/dashboard?id=ClydeDz_getavataaars-npm)
[](https://sonarcloud.io/dashboard?id=ClydeDz_getavataaars-npm)

[](https://bit.ly/getavataaars)## Usage
After installing, simply import Get Avataaars in your file.
```javascript
const avatars = require("getavataaars");
```
Consume the `generateAvatar()` API to get an avatar URL that you can use directly as an image. Supply the settings object to customize your avatar. All settings are pretty self-explanatory and matches the [web editor](https://getavataaars.com/). Adding the following code, for example:
```javascript
var image = avatars.generateAvatar({
Hair: avatars.Hair.Eyepatch,
Accessories: avatars.Accessories.Kurt,
Eyebrow: avatars.Eyebrow.Angry
});
```
Would produce the following image:
## Credits
[Avataaars](https://avataaars.com/) designed by [Pablo Stanley](https://twitter.com/pablostanley).
[Web editor](https://getavataaars.com/) by [Fang-Pen Lin](https://twitter.com/fangpenlin).
[React npm package](https://www.npmjs.com/package/avataaars) by [Fang-Pen Lin](https://twitter.com/fangpenlin).
This NPM package is developed by [Clyde D'Souza](https://twitter.com/clydedz).