Embeddable custom avatar generator
npm install @schoolhouse/avatars-customizer
# OR
yarn add @schoolhouse/avatars-customizer
React, react-dom, avatars, and lodash are peer dependencies.
import React from 'react'
import AvatarsCustomerizer from '@schoolhouse/avatars-customizer'
function Example() {
const [customizedAttributes,setCustomizedAttributes] = React.useState({
topType:'LongHairMiaWallace',
accessoriesType:'Prescription02',
hairColor:'BrownDark',
facialHairType:'Blank',
clotheType:'Hoodie',
clotheColor:'PastelBlue',
eyeType:'Happy',
eyebrowType:'Default',
mouthType:'Smile',
skinColor:'Light',
});
return (
<AvatarsCustomizer value={customizedAttributes} onChange={setCustomizedAttributes}/>
)
}
MIT © cgross