New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-native-swiper-animated

Package Overview
Dependencies
Maintainers
1
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-swiper-animated

Tinder-like swiper for react-native

0.7.0
Source
npm
Version published
Weekly downloads
19
-17.39%
Maintainers
1
Weekly downloads
 
Created
Source

react-native-swiper-animated

Tinder like animations swiper for React Native

Installation

$ npm i react-native-swiper-animated --save

Shots

Basic, Stack and Extended examples shots

Basic Usage

import React from 'react';
import {
  Text,
  View,
} from 'react-native';
import Swiper from 'react-native-swiper-animated';

const styles = {
  wrapper: {
    backgroundColor: '#009688',
  },
  slide1: {
    flex: 1,
    justifyContent: 'center',
    alignItems: 'center',
    backgroundColor: '#e91e63',
  },
  slide2: {
    flex: 1,
    justifyContent: 'center',
    alignItems: 'center',
    backgroundColor: '#673ab7',
  },
  slide3: {
    flex: 1,
    justifyContent: 'center',
    alignItems: 'center',
    backgroundColor: '#3f51b5',
  },
  text: {
    color: '#fff',
    fontSize: 30,
    fontWeight: 'bold',
  },
};

export default () => <Swiper
  style={styles.wrapper}
  paginationStyle={{ container: { backgroundColor: 'transparent' } }}
  paginationLeft={''}
  paginationRight={''}
  smoothTransition
  loop
>
  <View style={styles.slide1}>
    <Text style={styles.text}>Hello Swiper</Text>
  </View>
  <View style={styles.slide2}>
    <Text style={styles.text}>Beautiful</Text>
  </View>
  <View style={styles.slide3}>
    <Text style={styles.text}>And simple</Text>
  </View>
</Swiper>;

Examples

$ cd examples
$ npm i
$ react-native run-android

Quick start with examples.

Properties

Basic
PropDefaultTypeDescription
smoothTransitionfalseboolIf true, Swiper will only transit with minimal animations
looptrueboolSet to false to disable continuous loop mode.
index0numberIndex number of initial slide.
stackfalseboolSet to true to stack views
swipertrueboolSet to false to disable swiper (used when navigating using methods only)
Custom basic style & content
PropDefaultTypeDescription
style{...}styleSee default style in source.
swiperThreshold120numberUsed to set swiper distance before transition
backPressToBacktrueboolSet to false to disable previous card nagivation on back press
see more

Methods

forceLeftSwipe()

Swiper to left

forceRightSwipe()

Swiper to right

Development

$ cd examples
$ npm i
$ npm run watch
$ react-native run-android

Contribution

  • @chitezh The main author.

Questions

Feel free to contact me or create an issue

Inspired by leecade/Swiper and Tinder swiper by @brentvatne

Keywords

Tinder

FAQs

Package last updated on 26 Feb 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts