All Projects → Monte9 → React Native Parallax Scrollview

Monte9 / React Native Parallax Scrollview

Licence: mit
The Parallax ScrollView component we all deserve. 🚀

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to React Native Parallax Scrollview

Notselwyn
NotSelwyn's over-engineered automatic profile readme
Stars: ✭ 15 (-94.68%)
Mutual labels:  profile
stringify.me
Quick and Easy Profiles (No Login Required)
Stars: ✭ 52 (-81.56%)
Mutual labels:  profile
Anspress
AnsPress is the most complete question and answer system for WordPress. AnsPress is made with developers in mind, highly customizable. AnsPress provide an easy to use override system for theme
Stars: ✭ 264 (-6.38%)
Mutual labels:  profile
DaProfiler
DaProfiler allows you to create a profile on your target based in France only. The particularity of this program is its ability to find the e-mail addresses your target.
Stars: ✭ 58 (-79.43%)
Mutual labels:  profile
guilyx
Dynamic Profile with github statistics, coding info (time and languages) with WakaTime and music status with the spotify API, leave a ⭐ if you like it
Stars: ✭ 175 (-37.94%)
Mutual labels:  profile
HACKTOBERFEST2021 INSPIRATION
😎A Hacktoberfest-2021 Contribution Repository For Beginners😎...Simplest Repo for Beginners👨‍💻👨‍💻👨‍💻...Add your Profile Details, Photo and Inspirational Quote 🙌🙌🙌& There you go to do your first PR❤❤❤
Stars: ✭ 30 (-89.36%)
Mutual labels:  profile
web
realness.online
Stars: ✭ 15 (-94.68%)
Mutual labels:  profile
Livebot
An app that allows you to be inside a bot!
Stars: ✭ 271 (-3.9%)
Mutual labels:  profile
Developers-Portfolio
💼 This is a Social App for Developers to interact with other users through messages and sharing projects.
Stars: ✭ 101 (-64.18%)
Mutual labels:  profile
Quasar Admin Crm
Quasar CRM Admin | VueJS Admin | Featuring 3 different dashboards | Give it a star if you find it useful.
Stars: ✭ 254 (-9.93%)
Mutual labels:  profile
ansible-debian
Buildfiles: Ansible automated leight-weight and sensible Debian provisioning
Stars: ✭ 83 (-70.57%)
Mutual labels:  profile
mayank-profile
My Profile | Made using Quasar Framework and Vue.js
Stars: ✭ 23 (-91.84%)
Mutual labels:  profile
homesetup
Your shell good as hell ! Not just dotfiles.
Stars: ✭ 25 (-91.13%)
Mutual labels:  profile
raklaptudirm
Repository for Github profile README.
Stars: ✭ 19 (-93.26%)
Mutual labels:  profile
Profiles
Volatility profiles for Linux and Mac OS X
Stars: ✭ 265 (-6.03%)
Mutual labels:  profile
jakejarvis
hey 👋
Stars: ✭ 15 (-94.68%)
Mutual labels:  profile
KBotExt
Application that sends custom requests to League of Legends LCU api
Stars: ✭ 86 (-69.5%)
Mutual labels:  profile
Repository Hunter
🌹 Making GitHub more socially engaging 🎮 and fun 🍥 for all
Stars: ✭ 273 (-3.19%)
Mutual labels:  profile
Taoup
The Tao of Unix Programming (Ruby-powered ANSI colored fortunes)
Stars: ✭ 265 (-6.03%)
Mutual labels:  profile
teteusAraujo
Meu readme do meu perfil com informações sobre mim.
Stars: ✭ 123 (-56.38%)
Mutual labels:  profile

react-native-parallax-scroll-view


Demo

Demo gif

Installation

This package has a dependency of React Native Elements. Install RNE first with:

yarn add react-native-elements (make sure the version is 0.19.1)

Finally install this package using yarn or npm:

yarn add react-native-parallax-scrollview

Usage

Default Profile Component

import ParallaxScrollView from 'react-native-parallax-scrollview';

<ParallaxScrollView />

Default header view with custom User

<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'}}
/>

Default Header view & Custom ScrollView content

<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>

Custom Header view & ScrollView content

<ParallaxScrollView
  windowHeight={SCREEN_HEIGHT}
  backgroundSource='http://i.imgur.com/s4JEY9E.jpg'
  navBarTitle='Custom Title'
  navBarTitleColor='black'
  navBarColor='white'
  headerView={(
    <View style={styles.headerView}>
      <View style={styles.headerTextView}>
        <Text style={styles.headerTextViewTitle}>My App</Text>
        <Text style={styles.headerTextViewSubtitle}>
          Custom Header View
        </Text>
      </View>
    </View>
  )}
  leftIcon={{name: 'rocket', color: 'rgba(228, 117, 125, 1)', size: 30, type: 'font-awesome'}}
  leftIconOnPress={() => this.setState({index: (this.state.index + 1 ) % 3})}
  rightIcon={{name: 'user', color: 'rgba(228, 117, 125, 1)', size: 30, type: 'font-awesome'}}
  rightIconOnPress={() => this.setState({index: (this.state.index + 1 ) % 3})}
>
  <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>

API

prop default type description
backgroundSource {uri:http://i.imgur.com/6Iej2c3.png} ImageSourcePropType The background image for the header. The image source is (either a remote URL or a local file resource) backgroundSource={{uri:http://i.imgur.com/6Iej2c3.png}} or backgroundSource={require('./image.png')}
onBackgroundLoadEnd none callback Callback function when the background finishes loading (either with success or failure)
onBackgroundLoadError none callback Callback function when the background loading fails (an object is received with the error details)
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
navBarTitleColor 'white' string Color of the navBar title when displayed
navBarColor 'rgba(0, 0, 0, 1.0)' string Color of the navbar when shown
navBarHeight 65 number Height of the navBar when displayed
navBarView Left/Right Icons View custom object Pass in a custom object to override the default navigation bar view
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 none object Pass in the left icon name and type as an object. leftIcon={{name: 'rocket', color: 'red', size: 30, type: 'font-awesome'}}
leftIconOnPress none callback Callback function when the left icon is pressed
leftIconUnderlayColor 'transparent' string Underlay color for the left icon.
rightIcon none object Pass in the right icon name and type etc as an object. rightIcon={{name: 'user', color: 'blue', size: 30, type: 'font-awesome'}}
rightIconOnPress none callback Callback function when the right icon is pressed
rightIconUnderlayColor 'transparent' string Underlay color for the right icon.
children List View React Components Render any react views/components as children and these will be rendered below the headerView

Try it out

You can try it out with Exponent here

Example

Look at the example folder to run the expo app locally.

Motivation

Currently there are a couple packages that provide a similar parallax Scrollview component (here and here) although both of them are not maintained and wasn't exactly what I was looking for.

So I challenged myself to create a Parallax ScrollView component (using react-native-parallax-view as a base) with

  1. Sticky NavBar Header 🎉
  2. An awesome default profile component that just works out of the box (<ParallaxScrollView />)
  3. Flexible and comprehensive API to use the ScrollView component for any use case.

aka it's a (Parallax) ScrollView component for React Native that we truly deserve 🚀

Feedback

This repo is being actively manitained. Feel free to open a new Issue with a Feature Request or submit a PR with an Enhancement.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].