@unpourtous/react-native-clip-image

0.1.2 • Public • Published

react-native-clip-image

JavaScript Style Guide

Introduction

This component depends on react-native-svg. With this component you can clip a image both on android and ios. Since there is an issue about animation on higher version, we recommand using react-native-svg@4.5.0

demo

Installation

  1. Install react-native-svg from npm

    npm install react-native-svg@4.5.0 --save
  2. Link native code

    react-native link react-native-svg
  3. Install react-native-clip-image from npm

    npm install @unpourtous/react-native-clip-image --save

Usage

First, add PopupStub as sibling node of you Root Node

export default class example extends Component {
  render () {
    return (
      <View style={{flex: 1, alignItems: 'center', justifyContent: 'center'}}>
        <ClipImage
          style={{
            borderRadius: 10
          }}
          width={300}
          height={225}
          source={require('./images/monster.png')}
          duration={600}/>
      </View>
    )
  }
}

Thanks

Package Sidebar

Install

npm i @unpourtous/react-native-clip-image

Weekly Downloads

1

Version

0.1.2

License

MIT

Last publish

Collaborators

  • xiaosiyan
  • akb48
  • blackwang
  • fuwutu
  • lukequ
  • wushq5
  • ufolux
  • liuhuman
  • yatessss
  • raganyayoung
  • lhtin
  • erichua23
  • mcalsace
  • haywood
  • lemori
  • millerw