1.1.8 • Published 2 years ago

react-native-clippathview v1.1.8

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

React Native ClipPath

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

Example --> Demo

Getting started

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

Yarn

yarn add react-native-clippathview

IOS

Add Swift

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

/ios/name_project

add a .swift file

Usage

ClipPathViewH (Android Layer type Hardware)

import {ClipPathView , ClipPathViewH } from 'react-native-clippathview'

// TODO: What to do with the module?
    <ClipPathView style={{backgroundColor:'green'}} 

       
        d={myPath}
        viewBox={myViewBox}
        
        
    
    >
  
        <View >
            <Text style={{color:'white'}}>hello world</Text>
        </View>
        
    </ClipPathView>

Props

Namedescriptiontypedefault
svgKeyEach view must have a different keyString""
dThe shape, defined by a series of commandsString""
viewBoxdefines the position and dimension, in user spaceArrayNumberundefined
alignthe aligmentStringxMidYMid
aspectaspect ratioStringmeet
fillRuledetermines what side of a path is inside a shapeStringnonzero
strokeWidthdefines the thickness of a line (mobile)Number1
strokeCapline cap (mobile)string'butt'
strokeJoinline join (mobile)string'miter'
strokeMitercontrol the behavior of miter (mobile)Number4
strokeStartthe start (mobile)Number0
strokeEndthe end (mobile)Number1

Transform

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

Nametypedefault
translateZNumber (zIndex)0
transXNumber0
transYNumber0
transPercentageValueBoolfalse
rotNumber0
rotOxNumber0
rotOyNumber0
rotPercentageValueBoolfalse
scNumber1
scXNumber1
scYNumber1
scONumber0
scOxNumber0
scOyNumber0
scPercentageValueBoolfalse
1.1.8

2 years ago

1.1.7

2 years ago

1.1.6

2 years ago

1.1.5

3 years ago

1.1.4

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.1.3

3 years ago

1.1.2

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

1.0.4

3 years ago

1.0.2

3 years ago

1.0.3

3 years ago

1.0.1

3 years ago

1.0.0

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