Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/christianblandford/robotavars
- Owner: christianblandford
- License: mit
- Created: 2021-11-02T21:31:42.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2021-11-03T19:36:42.000Z (about 3 years ago)
- Last Synced: 2024-10-11T12:09:10.072Z (26 days ago)
- Language: JavaScript
- Size: 157 KB
- Stars: 7
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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