Skip to content

DongZhang/react-avataaars-plus

Repository files navigation

react-avataaars-plus

A react avatar component inspired by Avataaars, based on Sketch library Avataaars

NPM

Features

  • SVG based
  • Light weight
  • Scalable
  • Easy to use
  • Easy to integrate with custom editor

What's in the plus

  • 11 new handheld items
  • Configurable background colors available for solid & circled backgrounds
  • New WarmIvory skin color
  • A few minor svg display bug fixes

Install

install react-avataaars-plus with npm

npm install --save react-avataaars-plus

or yarn

npm install --save react-avataaars-plus

Usage

import React, { Component } from 'react'

import Avatar from 'react-avataaars-plus'

class MyApp extends Component {
  render() {
    return 
      <Avatar
        style={{ height: 280, width: 280 }}
        avatarConfig={{
          avatarStyle="circle",
          skinColor: 'warmIvory',
          backgroundColor: 'blue03',
          topType: 'shortHairDreads01',
          hairColor: 'black',
          eyeType: 'happy',
          eyebrowType: 'default',
          mouthType: 'smile',
          clothesType: 'hoodie',
          clothesColor: 'pastelBlue',
          handheldType: 'juice'
        }}
      />
  }
}

if you would like to see full examples run yarn start from root folder,then go into example folder and run yarn install then yarn start to run the project locally.

License

MIT © DongZhang

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages