Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-native-parallax-swiper

Package Overview
Dependencies
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-parallax-swiper

Full Screen Parallax Swiper Allowing Arbitrary UI Injection

  • 0.1.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
30
increased by66.67%
Maintainers
1
Weekly downloads
 
Created
Source

React Native Parallax Swiper

Configurable parallax swiper based on an iOS pattern. Uses Native Driver for super smooth parallax.

Ways to use this component

  1. You have a background image that parallaxes while your UI moves at the ScrollView speed

Example 1

  1. You have no background image and all of your UI parallaxes

Example 2

☝️ React Native Zoomable for image zoom. Artwork by Daniel Mackey.

You can see this effect in apps like:

  • iOS Photos (Camera Roll)
  • Twitter Moments
  • Kylie Jenner app 😅

Add it to your project

Run npm install react-native-parallax-swiper --save

Usage

import ParallaxSwiper from 'react-native-parallax-swiper';
<ParallaxSwiper
  parallaxStrength={80}
  dividerWidth={8}
  dividerColor="black"
  backgroundColor="#bae"
  onMomentumScrollEnd={() => console.log('💩')}
>
  <View
    style={{
      flex: 1,
      alignItems: 'center',
      justifyContent: 'center',
     }}
     backgroundImage={'https://goo.gl/7Mvjji'}
    >
    <Text>Pass Arbitrary JSX to ParallaxSwiper as Children</Text>
  </View>
</ParallaxSwiper>

Props

PropTypeDescription
parallaxStrengthnumberhow much parallax you want
dividerWidthnumberwidth of slide divider
dividerColorstringcolor of slide divider
backgroundImageResizeModestringhow your background image should resize
backgroundColorstringcolor of main scrollview background
onMomentumScrollEndfunctioncalled when scrollview completed scrolling
childrenReactComponentspass arbitrary JSX into slide

Copyright (c) 2017 Zachary Gibson Licensed under the MIT license.

Keywords

FAQs

Package last updated on 31 Jul 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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc