2.1.1 • Published 4 months ago

@ckbab/react-native-cartar v2.1.1

Weekly downloads
-
License
ISC
Repository
github
Last release
4 months ago

react-native-cartar

React Native wrapper for cartar.io.

Installation

yarn add @ckbab/react-native-cartar

This package depends on react-native-svg so you need to install it as well.

Examples

npm.io npm.io npm.io

Note that the examples above are fetched from the latest version of cartar.io so there might be a mismatch between that version and the version of this lib.

Usage

import Cartar from "@ckbab/react-native-cartar";

<Cartar size={200} beard={2} beardColor={3} skinColor={2} ... />

Properties

NameTypeValuesDefault value
beardnumber0 - 100
beardColornumber or string0-100
earringsnumber0 - 70
earringsColorstring-npm.io #f00
eyenumber0 - 180
eyeColorstring-npm.io #000
hairnumber0 - 320
hairColornumber or string0-100
hatnumber0 - 70
hatColorstring-npm.io #f00
mouthnumber0 - 150
mouthColorstring-npm.io #f00
necklacenumber0 - 60
necklaceColorstring-npm.io #f00
shirtnumber0 - 190
shirtColorstring-npm.io #ddd
shirtColorAltstring-npm.io #aaa
skinColornumber or string0-80
sizenumber-100

Note that skinColor, hairColor and beardColor support both predefined colors (e.g. 3) or custom colors (e.g. #cc00ff).

Default colors

Skin

ValueHex codeExample
1#ffdbacnpm.io
2#f1c27dnpm.io
3#e0ac69npm.io
4#c68642npm.io
5#8d5524npm.io
6#83572enpm.io
7#624125npm.io
8#422d1bnpm.io

Hair

ValueHex codeExample
1#f2e7c7npm.io
2#f2e1aenpm.io
3#f2da91npm.io
4#debe99npm.io
5#aa8866npm.io
6#6d4730npm.io
7#4d2d1anpm.io
8#2d170enpm.io
9#121821npm.io
10#b06500npm.io

Beard

The color is based on the skinColor value where 1 is light colored beard and 10 is dark colored beard.

2.1.1

4 months ago

2.1.0

4 months ago

2.0.2

2 years ago

2.0.1

2 years ago

2.0.0

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago