Skip to content

Latest commit

 

History

History
44 lines (32 loc) · 941 Bytes

README.md

File metadata and controls

44 lines (32 loc) · 941 Bytes

avataaars-customizer

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

Screenshot

Install

npm install --save avataaars-customizer

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

Usage

import React from 'react'

import AvataaarsCustomerizer from 'avataaars-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 (
    <AvataaarsCustomizer value={customizedAttributes} onChange={setCustomizedAttributes}/>
  )
}

License

MIT © cgross