
Research
/Security News
Contagious Interview Campaign Escalates With 67 Malicious npm Packages and New Malware Loader
North Korean threat actors deploy 67 malicious npm packages using the newly discovered XORIndex malware loader.
react-native-scroll-view
Advanced tools
The (Parallax) ScrollView component we all deserve. :rocket:
Install the package using yarn or npm:
yarn add react-native-scroll-view
or npm i react-native-scroll-view
import ParallaxScrollView from 'react-native-scroll-view';
<ParallaxScrollView />
<ParallaxScrollView
windowHeight={SCREEN_HEIGHT * 0.4}
backgroundSource='http://i.imgur.com/UyjQBkJ.png'
navBarTitle='John Oliver'
userName='John Oliver'
userTitle='Comedian'
userImage='http://i.imgur.com/RQ1iLOs.jpg'
leftIcon={{name: 'rocket', color: 'rgba(131, 175, 41, 1)', size: 30, type: 'font-awesome'}}
rightIcon={{name: 'user', color: 'rgba(193, 193, 193, 1)', size: 30, type: 'font-awesome'}}
/>
<ParallaxScrollView
windowHeight={SCREEN_HEIGHT * 0.4}
backgroundSource='http://i.imgur.com/UyjQBkJ.png'
navBarTitle='John Oliver'
userName='John Oliver'
userTitle='Comedian'
userImage='http://i.imgur.com/RQ1iLOs.jpg'
leftIcon={{name: 'rocket', color: 'rgba(193, 193, 193, 1)', size: 30, type: 'font-awesome'}}
rightIcon={{name: 'user', color: 'rgba(193, 193, 193, 1)', size: 30, type: 'font-awesome'}}
>
<ScrollView style={{flex: 1, backgroundColor: 'rgba(228, 117, 125, 1)'}}>
<View style={{height: 300, justifyContent: 'center', alignItems: 'center'}}>
<Text style={{fontSize: 32, color: 'white'}}>Custom view</Text>
</View>
<View style={{height: 300, justifyContent: 'center', alignItems: 'center'}}>
<Text style={{fontSize: 32, color: 'white'}}>keep going.</Text>
</View>
<View style={{height: 300, justifyContent: 'center', alignItems: 'center'}}>
<Text style={{fontSize: 32, color: 'white'}}>keep going..</Text>
</View>
<View style={{height: 300, justifyContent: 'center', alignItems: 'center'}}>
<Text style={{fontSize: 32, color: 'white'}}>keep going...</Text>
</View>
<View style={{height: 300, justifyContent: 'center', alignItems: 'center'}}>
<Text style={{fontSize: 32, color: 'white'}}>the end! :)</Text>
</View>
</ScrollView>
</ParallaxScrollView>
prop | default | type | description |
---|---|---|---|
backgroundSource | http://i.imgur.com/6Iej2c3.png | string | The background image for the header (url) |
windowHeight | SCREEN_HEIGHT * 0.5 | number | The height of the header window |
navBarTitle | Katy Friedson | string | The title to be display on the NavBar header |
userName | Katy Friedson | string | The user name displayed in the collapsable header view |
userImage | http://i.imgur.com/uma9OfG.jpg | string | The user image displayed in the collapsable header view |
userTitle | Engineering Manager | string | The user title displayed in the collapsable header view |
headerView | Profile View | custom object | Pass in a custom object to override the default header view |
leftIcon | menu | object | Pass in the left icon name and type as an object. leftIcon={{name: 'rocket', color: 'red', size: 30, type: 'font-awesome'}} |
rightIcon | present | object | Pass in the right icon name and type etc as an object. rightIcon={{name: 'user', color: 'blue', size: 30, type: 'font-awesome'}} |
children | List View | React Components | Render any react views/components as children and these will be rendered below the headerView |
You can try it out with Exponent here.
Look at the example
folder to run the expo app locally.
There are a couple packages that provide a similar parallax scroll view component (here and here) although both of them are not maintained.
I really liked react-native-parallax-view but here are a couple reasons I didn't use it in my app:
So I set out to create a Parallax ScrollView component (using react-native-parallax-view as a base) with
<ParallaxScrollView />
)aka it's a (Parallax) ScrollView component for React Native that we truly deserve :rocket:
This repo is being actively manitained. Feel free to open a new Issue with a Feature Request
or submit a PR with an Enhancement
.
FAQs
The (Parallax) ScrollView component we all deserve
The npm package react-native-scroll-view receives a total of 0 weekly downloads. As such, react-native-scroll-view popularity was classified as not popular.
We found that react-native-scroll-view 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
North Korean threat actors deploy 67 malicious npm packages using the newly discovered XORIndex malware loader.
Security News
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
Security News
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.