1.0.3 • Published 4 years ago
react-avataaars-plus v1.0.3
react-avataaars-plus
A react avatar component inspired by Avataaars, based on Sketch library Avataaars
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-plusor yarn
npm install --save react-avataaars-plusUsage
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