Added
-
New API based on functions instead of classes in preparation for version 5.0
Old API
import Avatars from `@dicebear/avatars`; import style from `@dicebear/avatars-identicon-sprites`; let options = {}; let seed = 'custom-seed'; let avatars = new Avatars(style, options); let svg = avatars.create(seed);
New API
import { createAvatar } from `@dicebear/avatars`; import * as style from `@dicebear/avatars-identicon-sprites`; let svg = createAvatar(style, { seed: 'custom-seed', // ... and other options });
-
JSON Schema added to each avatar style. Used for API, Types and upcoming features.
-
Metadata in generated avatars with author and license information.
@dicebear/avatars
- New Option
backgroundColor
@dicebear/micah
- New avatar style based on the "Avatar Illustration System" by Micah Lanier.
https://www.figma.com/community/file/829741575478342595
@dicebear/avatars-avataaars-sprites
-
New option values for
accessoriesColor
,clotheColor
andhatColor
:blue01
blue02
blue03
gray01
gray02
pastelBlue
pastelGreen
pastelOrange
pastelRed
pastelYellow
-
New option
clotheGraphic
-
New option values for
clothes
:blazerAndShirt
blazerAndSweater
collarAndSweater
graphicShirt
shirtCrewNeck
shirtScoopNeck
shirtVNeck
-
New option values for
eyebrows
:angryNatural
defaultNatural
flatNatural
raisedExcited
raisedExcitedNatural
sadConcerned
sadConcernedNatural
unibrowNatural
upDown
upDownNatural
frownNatural
-
New option values for
eyes
:closed
xDizzy
eyeRoll
-
New option values for
facialHairColor
andhairColor
:blondeGolden
brownDark
pastelPink
silverGray
-
New option values for
facialHair
:beardMedium
beardLight
beardMagestic
moustaceFancy
moustacheMagnum
-
New option values for
mouth
:screamOpen
-
New option values for
top
:bigHair
bob
bun
curly
curvy
dreads
frida
fro
froAndBand
miaWallace
longButNotTooLong
shavedSides
straight01
straight02
straightAndStrand
dreads01
dreads02
frizzle
shaggy
shaggyMullet
shortCurly
shortFlat
shortRound
shortWaved
sides
theCaesar
theCaesarAndSidePart
hat
winterHat01
winterHat02
winterHat03
winterHat04
Changed
- Dependency
svgson
updated to version 5.2 - Removed style
isolation:isolate
in all avatar styles
Deprecated
- Default exports are deprecated. Use new function based API instead. (See "Added")
@dicebear/avatars
- Color class is deprecated and will be removed with version 5.0.
- Parser class is deprecated and will be removed with version 5.0.
- Option
background
is deprecated. UsebackgroundColor
instead.
@dicebear/avatars-avataaars-sprites
-
Some
accessoriesColor
andclotheColor
values are deprecated:blue
=> useblue01
,blue02
andblue03
insteadgray
=> usegray01
andgray02
insteadpastel
=> usepastelBlue
,pastelGreen
,pastelOrange
,pastelRed
andpastelYellow
instead
-
Some
clothes
values are deprecated:blazer
=> useblazerAndShirt
andblazerAndSweater
insteadsweater
=> usecollarAndSweater
insteadshirt
=> usegraphicShirt
,shirtCrewNeck
,shirtScoopNeck
andshirtVNeck
instead
-
Some
eyebrow
values are deprecated:flat
=> useflatNatural
insteadraised
=> useraisedExcited
andraisedExcitedNatural
insteadsad
=> usesadConcerned
andsadConcernedNatural
insteadunibrow
=> useunibrowNatural
insteadup
=> useupDown
andupDownNatural
insteadfrown
=> usefrownNatural
instead
-
Some
eyes
values are deprecated:close
=> useclosed
insteaddizzy
=> usexDizzy
insteadroll
=> useeyeRoll
instead
-
Some
facialHairColor
andhairColor
values are deprecated:pastel
=> usepastelPink
insteadgray
=> usesilverGray
instead
-
Some
facialHair
values are deprecated:medium
=> usebeardMedium
insteadlight
=> usebeardLight
insteadmajestic
=> usebeardMajestic
insteadfancy
=> usemoustaceFancy
insteadmagnum
=> usemoustacheMagnum
instead
-
Some
mouth
values are deprecated:scream
=> usescreamOpen
instead
-
Option
mode
is deprecated. -
Some
top
values are deprecated:longHair
=> usebigHair
,bob
,bun
,curly
,curvy
,dreads
,frida
,fro
,froAndBand
,miaWallace
,
longButNotTooLong
,shavedSides
,straight01
,straight02
andstraightAndStrand
insteadshortHair
=> use
dreads01
,dreads02
,frizzle
,shaggy
,shaggyMullet
,shortCurly
,shortFlat
,shortRound
,shortWaved
,sides
,theCaesar
andtheCaesarAndSidePart
instead
@dicebear/avatars-gridy-sprites
- Change
deterministic
default totrue
.
Removed
@dicebear/avatars
- Removed unused webpack build. We will completely switch to microbundle with version 5 and also support CDNs like
unpkg.