Skip to content

schoolhouse-world/avatars-customizer

 
 

Repository files navigation

avatars-customizer

Embeddable custom avatar generator

Screenshot

Install

npm install @schoolhouse/avatars-customizer
# OR
yarn add @schoolhouse/avatars-customizer

React, react-dom, avatars, and lodash are peer dependencies.

Usage

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}/>
  )
}

License

MIT © cgross

About

Embeddable custom avatar generator based on https://avataaars.com/ and https://getavataaars.com/.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 86.3%
  • CSS 13.7%