# avataaars
**Repository Path**: lockelee1015/avataaars
## Basic Information
- **Project Name**: avataaars
- **Description**: No description available
- **Primary Language**: Unknown
- **License**: MIT
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2021-10-30
- **Last Updated**: 2021-10-30
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# React component for Avataaars
The core React component for [Avataaars Generator](https://getavataaars.com/) developed by [Fang-Pen Lin](https://twitter.com/fangpenlin), based on the Sketch library [Avataaars](https://avataaars.com/) designed by [Pablo Stanley](https://twitter.com/pablostanley).

## Features
- SVG based
- Light weight
- Scalable
- Easy to use
- Easy to integrate with custom editor
- Comes with [official editor](https://getavataaars.com/)
## Usage
First, you need to install the avataaars component package, here you run
```
yarn add avataaars
```
or
```
npm install avataaars --save
```
if you are using npm. Then, in your React app, import the Avataaar component and put it where you like it to be, for example
```jsx
import * as React from 'react'
import Avatar from 'avataaars'
export default class MyComponent extends React.Component {
render () {
return
}
}
```
To showcase individual pieces of the avatar you can use the Piece component, for example:
```jsx
import * as React from 'react'
import {Piece} from 'avataaars';
export default class MyComponent extends React.Component {
render () {
return
}
}
```
To explore avatar options and generate the React code, please use [Avataaars Generator](https://getavataaars.com/)
## Collect options
To build your own avatar editor, you may want to use lower level `Avatar` component along with `OptionContext`. For more details usage, please reference to source code of [avataaars-generator](https://github.com/fangpenlin/avataaars-geneator), see how it uses `OptionContext` to collection available options.