Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/christianblandford/robotavars

Dynically generated robot avatars for your website
https://github.com/christianblandford/robotavars

Last synced: 10 days ago
JSON representation

Dynically generated robot avatars for your website

Awesome Lists containing this project

README

        

# Robotavars

![Example Robot Avatar](https://github.com/christianblandford/robotavars/blob/main/robot_example.png?raw=true)

Dynically generated robot avatars for your website

# Installation

run `yarn add robotavars` or `npm install --save robotavars`

# Usage

```
import { Robotavar } from 'robotavars'

or

```

## Functions

To get a list of all head types, `import { headTypes } from 'robotavars'`, which returns an array of strings of all head types.

To get a list of all antenna types, `import { antennaTypes } from 'robotavars'`, which returns an array of strings of all antenna types.

To get a list of all mouth types, `import { mouthTypes } from 'robotavars'`, which returns an array of strings of all mouth types.

## Options

### Heads

Types: ['default', 'longNeck', 'sharp', 'round', 'knight']

### Antenna

Types: ['default', 'snoo', 'shrek', 'bender', 'rabbitEars', 'satellite', 'calculon']

### Mouths

Types: ['default', 'softSmile', 'smile', 'concerned']

### Size

Provide the desired size of the svg in pixels as a prop. Ex: ``

### Clothing

All clothing options come from the amazing [Avataaars](https://github.com/fangpenlin/avataaars) project. Note that values for the following props values must be capitalized, as that is how Avataaars requires them.

To specify the clothing type the robot will wear, pass the 'clothes' prop

Clothing color can be configured with the 'fabricColor' prop

Graphic tee graphics are specified with the 'graphics' prop