
Research
Security News
Malicious PyPI Package Exploits Deezer API for Coordinated Music Piracy
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
react-native-parallax-swiper
Advanced tools
Full Screen Parallax Swiper Allowing Arbitrary UI Injection
Configurable parallax swiper based on an iOS pattern.
Features
$ yarn add react-native-parallax-swiper
import ParallaxSwiper from 'react-native-parallax-swiper';
constructor() {
super();
this.myCustomAnimatedValue = new Animated.Value(0);
}
<ParallaxSwiper
parallaxStrength={80}
animatedScrollValue={this.myCustomAnimatedValue}
dividerWidth={8}
dividerColor="black"
backgroundColor="#fff"
onMomentumScrollEnd={activePageIndex => console.log(activePageIndex)}
>
<Animated.View
style={{
flex: 1,
alignItems: "center",
justifyContent: "center",
opacity: this.myCustomAnimatedValue.interpolate({
inputRange: [0, deviceWidth * 0.25],
outputRange: [1, 0]
})
}}
backgroundImage={`https://source.unsplash.com/user/erondu/${deviceHeight + 1}x${deviceWidth + 1}`}
>
<Text>Parallaxing is rad</Text>
</Animated.View>
<View
style={{
flex: 1,
alignItems: "center",
justifyContent: "center"
}}
backgroundImage={`https://source.unsplash.com/user/erondu/${deviceHeight}x${deviceWidth}`}
>
<Text>Parallaxing is too rad</Text>
</View>
</ParallaxSwiper>
Prop | Type | Default | Description |
---|---|---|---|
parallaxStrength | Number | 80 | This number determines how slow parallax’ing element moves. Lower number yields a subtler parallax effect, higher number increases parallax effect. |
dividerWidth | Number | 8 | The width of the divider between each page. (horizontal only) |
dividerColor | String | black | Color of divider. |
backgroundImage | String | N/A | The image source. If used this becomes the background image that parallaxes. (remote URL only for now) |
backgroundImageResizeMode | String | cover | Determines how to resize the image. |
backgroundColor | String | black | The main view’s background color. |
scrollToIndex | Function | 0 | Scrolls to index with a smooth animation. If used onComponentDidMount scroll is immediate with no animation. |
onMomentumScrollEnd | Function | N/A | Called when ScrollView stops scrolling and is passed the current page index. |
animatedScrollValue | Animated.Value | 0 | Optionally pass a new instance of Animated.Value to this prop to have access to the animated scroll value to animate your own components. |
children | ReactComponents | N/A | JSX to inject into the page. |
vertical | Boolean | false | When true, ParallaxSwiper’s children are arranged vertically in a column instead of horizontally in a row. For now only iOS supports this, but there is work to implement vertical paging on Android. |
showsHorizontalScrollIndicator | Boolean | false | When true, shows a horizontal scroll indicator. The default value is false. |
showsVerticalScrollIndicator | Boolean | false | When true, shows a vertical scroll indicator. The default value is false. |
This component is inspired by an iOS pattern that no react-native-parallax-whatever previously delivered. It emulates this pattern by using the ScrollView component which has features like velocity, paging, and platform specific easing curves; It also has optional dividers to split up each page. You can see this pattern in apps like iOS Camera Roll, Twitter Moments, Kylie Jenner’s app, Vevo’s app, and more.
Chris LeBlanc [💻] |
---|
Hit me up on Twitter, or create an issue.
Copyright (c) 2017 Zachary Gibson Licensed under the MIT license.
FAQs
Full Screen Parallax Swiper Allowing Arbitrary UI Injection
The npm package react-native-parallax-swiper receives a total of 15 weekly downloads. As such, react-native-parallax-swiper popularity was classified as not popular.
We found that react-native-parallax-swiper demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.
Security News
Newly introduced telemetry in devenv 1.4 sparked a backlash over privacy concerns, leading to the removal of its AI-powered feature after strong community pushback.