Avataaars

Designed by Pablo Stanley. The Sketch library can be found on avataaars.com.

Usage#

HTTP-API (recommended)#

Our free HTTP-API is the easiest way to use this avatar style. Just use the following URL as image source.

https://avatars.dicebear.com/api/avataaars/:seed.svg

See the HTTP API documentation for more information.

Examples#

previewurl
https://avatars.dicebear.com/api/avataaars/example.svg
https://avatars.dicebear.com/api/avataaars/example.svg?top[]=shortHair
https://avatars.dicebear.com/api/avataaars/example.svg?top[]=shortHair&accessoriesChance=93

NPM#

Install the Avatars and this avatar style with the following command.

npm install --save @dicebear/avatars @dicebear/avatars-avataaars-sprites

Now you are ready to create your first Avatar.

import Avatars from '@dicebear/avatars';
import sprites from '@dicebear/avatars-avataaars-sprites';
let options = {};
let avatars = new Avatars(sprites, options);
let svg = avatars.create('custom-seed');

Options#

namealiastypedefaultdescription
radiusrnumber0Avatar border radius
dataUriboolfalseReturn avatar as data uri instead of XML
Not supported by the HTTP API
widthwnumbernullFixed width
heighthnumbernullFixed height
marginmnumber0Avatar margin in percent
HTTP-API limitation Max value 25
backgroundbstringnullAny valid color identifier
HTTP-API limitation Only hex (3-digit, 6-digit and 8-digit) values are allowed. Use url encoded hash: %23.
stylestringtransparentOne of: transparent, circle
modestringincludeinclude or exclude passed options.
toparray of stringsnullPossible values: longHair, shortHair, eyepatch, hat, hijab, turban
topChancenumber100Probability in percent
hatColorarray of stringsnullPossible values: black, blue, gray, heather, pastel, pink, red, white
hairColorarray of stringsnullPossible values: auburn, black, blonde, brown, pastel, platinum, red, gray
accessoriesarray of stringsnullPossible values: kurt, prescription01, prescription02, round, sunglasses, wayfarers
accessoriesChancenumber10Probability in percent
accessoriesColorarray of stringsnullPossible values: black, blue, gray, heather, pastel, pink, red, white
facialHairarray of stringsnullPossible values: medium, light, majestic, fancy, magnum
facialHairChancenumber10Probability in percent
facialHairColorarray of stringsnullPossible values: auburn, black, blonde, brown, pastel, platinum, red, gray
clothesarray of stringsnullPossible values: blazer, sweater, shirt, hoodie, overall
clothesColorarray of stringsnullPossible values: black, blue, gray, heather, pastel, pink, red, white
eyesarray of stringsnullPossible values: close, cry, default, dizzy, roll, happy, hearts, side, squint, surprised, wink, winkWacky
eyebrowarray of stringsnullPossible values: angry, default, flat, raised, sad, unibrow, up, frown
moutharray of stringsnullPossible values: concerned, default, disbelief, eating, grimace, sad, scream, serious, smile, tongue, twinkle, vomit
skinarray of stringsnullPossible values: tanned, yellow, pale, light, brown, darkBrown, black