1.2.0 • Published 10 months ago

react-native-image-compare-slider v1.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

Demo

Click to watch the demo

Installation

Installation with npm

  npm install react-native-image-compare-slider

Installation with yarn

  yarn add react-native-image-compare-slider

Make sure to install following dependencies

  react-native-gesture-handler react-native-reanimated react-native-responsive-screen

Props

  • image1 (ImageSource, Required): The source of the first image (on the left side of the slider).
  • image2 (ImageSource, Required): The source of the second image (on the right side of the slider).
  • slider (ImageSource, Required): The slider image between the two images.
  • style (ViewStyle, Optional): Custom styles for the slider container.
  • image1Style (ImageStyle, Required): Custom styles for the first image (left image).
  • image2Style (ImageStyle, Required): Custom styles for the second image (right image).
  • sliderWidth (Number, Required): Width value for the slider image.
  • sliderHeight (Number, Required): Height value for the slider image.
  • screenNormalizingValue (Number, Optional): Threshold value for the right side screen (Till where can slider move).

Usage/Examples

import ImageCompareSlider from 'react-native-image-compare-slider';

function App() {
  return 
  (
      <ImageCompareSlider
        image1={require('./imageAfter.png')}
        image2={require('./imageBefore.png')}
        image1Style={{height: '50%',width:'100%'}}
        image2Style={{height: '50%',width:'100%'}}
        slider={require('./slider.png')}
        sliderHeight={200}
        sliderWidth={15}
      />
   )
}
1.2.0

10 months ago

1.0.9

10 months ago

1.0.8

10 months ago

1.0.7

10 months ago

1.0.6

10 months ago

1.0.5

10 months ago

1.0.4

10 months ago

1.0.3

10 months ago

1.0.2

10 months ago

1.0.1

10 months ago

1.0.0

10 months ago