BigHeads avatars for React Native. Based on @bigheads/core
yarn add react-native-bigheads react-native-svg
or
npm install react-native-bigheads react-native-svg --save
This package requires react-native-svg to be installed
cd ios && pod install
import the BigHead
component from react-native-bigheads
import { BigHead } from 'react-native-bigheads'
use the BigHead
component like this:
<BigHead
accessory="shades"
bgColor="blue"
bgShape="circle"
body="chest"
clothing="tankTop"
clothingColor="black"
eyebrows="angry"
eyes="wink"
facialHair="mediumBeard"
graphic="vue"
hair="short"
hairColor="black"
hat="none"
hatColor="green"
lashes={false}
lipColor="purple"
mouth="open"
showBackground={true}
size={300}
skinTone="brown"
/>
accessory
bgColor
bgShape
body
clothing
clothingColor
containerProps
containerStyles
eyebrows
eyes
facialHair
graphic
hair
hairColor
hat
hatColor
lashes
lipColor
mouth
showBackground
size
skinTone
Type of accessory
Type | Required | Default |
---|---|---|
enum('none', 'roundGlasses', 'tinyGlasses', 'shades', 'faceMask', 'hoopEarrings') | No | Random |
The color of the background
Type | Required | Default |
---|---|---|
enum('blue', 'green', 'red', 'orange', 'yellow', 'turqoise', 'pink', 'purple') | No | Random |
The shape of the background
Type | Required | Default |
---|---|---|
enum('circle', 'square', 'squircle') | No | Random |
Type of body
Type | Required | Default |
---|---|---|
enum('chest', 'breasts') | No | Random |
Type of cloth
Type | Required | Default |
---|---|---|
enum('naked', 'shirt', 'dressShirt', 'vneck', 'tankTop', 'dress', 'denimJacket', 'hoodie', 'chequeredShirt', 'chequeredShirtDark') | No | Random |
The color of the clothes
Type | Required | Default |
---|---|---|
enum('white', 'blue', 'black', 'green', 'red') | No | Random |
Props to be passed to the container element (View)
Type | Required |
---|---|
View.props | No |
Styles to be applied to the container element (View)
Type | Required |
---|---|
Style | No |
Type of eyebrows
Type | Required | Default |
---|---|---|
enum('raised', 'leftLowered', 'serious', 'angry', 'concerned') | No | Random |
Type of eyes
Type | Required | Default |
---|---|---|
enum('normal', 'leftTwitch', 'happy', 'content', 'squint', 'simple', 'dizzy', 'wink', 'hearts', 'crazy', 'cute', 'dollars', 'stars', 'cyborg', 'simplePatch', 'piratePatch') | No | Random |
Type of facial hair
Type | Required | Default |
---|---|---|
enum('none', 'stubble', 'mediumBeard', 'goatee') | No | Random |
Type of graphic over the t-shirts
Type | Required | Default |
---|---|---|
enum('none', 'redwood', 'gatsby', 'vue', 'react', 'graphQL', 'donut', 'rainbow') | No | Random |
Type of hair
Type | Required | Default |
---|---|---|
enum('none', 'long', 'bun', 'short', 'pixie', 'balding', 'buzz', 'afro', 'bob', 'mohawk') | No | Random |
The color of the hair
Type | Required | Default |
---|---|---|
enum('blonde', 'orange', 'black', 'white', 'brown', 'blue', 'pink') | No | Random |
Type of hat
Type | Required | Default |
---|---|---|
enum('none', 'beanie', 'turban', 'party', 'hijab') | No | Random |
The color of the hat
Type | Required | Default |
---|---|---|
enum('white', 'blue', 'black', 'green', 'red') | No | Random |
Show lashes
Type | Required | Default |
---|---|---|
boolean | No | Random |
The color of the lips
Type | Required | Default |
---|---|---|
enum('red', 'purple', 'pink', 'turqoise', 'green') | No | Random |
Type of mouth
Type | Required | Default |
---|---|---|
enum('grin', 'sad', 'openSmile', 'lips', 'open', 'serious', 'tongue', 'piercedTongue', 'vomitingRainbow') | No | Random |
Whether or not to display the background color
When true
it cuts off everything below the avatar otherwise it won't clip off any of the avatar
Type | Required | Default |
---|---|---|
boolean | No | true |
Size of the avatar
Type | Required | Default |
---|---|---|
number | No | 100 |
The color of the skin
Type | Required | Default |
---|---|---|
enum('light', 'yellow', 'brown', 'dark', 'red', 'black') | No | Random |
- Some portions of this code belong to the Big Heads authors which are distributed under the MIT License
- Felipe Céspedes
Learn about the latest improvements
This project is licensed under the MIT License - see the LICENSE file for details
Please see the Contributing Guidelines.