2.4.6 • Published 2 years ago

react-native-painter v2.4.6

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Painter

Paint your imagination

android: api 21+
ios : 10.0+
web : SVG

Example(reanimated 2.2.0) -> Demo

Getting started

$ npm install react-native-painter --save
$ react-native link react-native-painter

or

$ yarn add react-native-painter

IOS

Add Swift

(If you are using expo sdk >=42 you don't need to do this)

/ios/name_project

add a .swift file

Freatures

Color:

   import { Color } from 'react-native-painter'

    const colorRed = Color('red')
    const colorBlack = Color('rgba(0,0,0,1)')
    const colorGreen = Color('#00FF00')
        
    

Common props:

Namedescriptiontypedefault
maskReference of a Mask elementStringundefined
opacityThe opacity attribute specifies the transparencyNumber1
fillThe fill prop refers to the color inside the shape.Colorblack
fillRuledetermines what side of a path is inside a shapeStringnonzero
fillOpacitythe opacity of the color 0 - 1Number1
strokedefines the color of a lineColortransparent
strokeOpacitythe opacity of the line color 0 - 1Number1
strokeWidthdefines the thickness of a lineNumber1
strokeCapline capstring'butt'
strokeJoinline joinstring'miter'
strokeMitercontrol the behavior of miterNumber4
strokeStartthe startNumber0
strokeEndthe endNumber1
shadowset the sahdow colorColor'black'
shadowRadiusthe radiusNumber2
shadowOffsetset the offsetNumber2
shadowOffsetXset the offset xNumber2
shadowOffsetYset the offset yNumber2
shadowPercentageValueoffset * size (mobile)Boolfalse

Web:

Namedescriptiontypedefault
painterKeyrequired , unique keyString""
viewBoxWhen creating custom components, you must pass the painter propsArrayNumberundefined
alignWhen creating custom components, you must pass the painter propsStringxMidYMid
aspectWhen creating custom components, you must pass the painter propsStringmeet
dashArrayrequired for stroke start and endNumber0
dashClipValueuseful with cap round & stroke start > 0 & stroke end < 1 0 to 1 rec:0.05Number0
shadowRectclip RegionObjectsize * 2

Transform

The percentageValue property refers to the fact that the Origin will be multiplied by the size of the view.

Nametypedefault
translateZ (zIndex)(mobile)Number0
transXNumber0
transYNumber0
transPercentageValue (mobile)Boolfalse
rotNumber0
rotONumber0
rotOxNumber0
rotOyNumber0
rotPercentageValue (mobile)Boolfalse
scNumber1
scXNumber1
scYNumber1
scONumber0
scOxNumber0
scOyNumber0
scPercentageValue (mobile)Boolfalse
2.4.0

2 years ago

2.4.3

2 years ago

2.4.2

2 years ago

2.4.5

2 years ago

2.4.4

2 years ago

2.3.9

2 years ago

2.4.6

2 years ago

2.3.8

2 years ago

2.3.7

2 years ago

2.3.0

2 years ago

2.3.2

2 years ago

2.3.1

2 years ago

2.3.4

2 years ago

2.3.3

2 years ago

2.3.6

2 years ago

2.3.5

2 years ago

2.2.1

3 years ago

2.2.3

3 years ago

2.2.2

3 years ago

2.2.5

3 years ago

2.2.4

3 years ago

2.2.7

3 years ago

2.2.6

3 years ago

2.2.9

3 years ago

2.2.8

3 years ago

2.1.8

3 years ago

2.1.7

3 years ago

2.1.6

3 years ago

2.1.4

3 years ago

2.1.5

3 years ago

2.1.2

3 years ago

2.1.1

3 years ago

2.1.3

3 years ago

2.0.9

3 years ago

2.0.8

3 years ago

2.1.0

3 years ago

2.0.5

3 years ago

2.0.7

3 years ago

2.0.6

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

2.0.3

3 years ago

2.0.2

3 years ago

2.0.4

3 years ago

2.0.1

3 years ago

2.0.0

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

0.0.8

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago