No description, website, or topics provided.
Switch branches/tags
Nothing to show
Clone or download
zehfernandes Merge pull request #6 from lucianomlima/img-patch
Add local images and yarn instructions
Latest commit fd22201 Aug 28, 2018
Permalink
Failed to load latest commit information.
examples bump version Jun 8, 2018
imgs chore: Add images to repository Aug 26, 2018
src remove setResponder Jun 8, 2018
.gitignore Hello git Oct 5, 2017
.npmignore update package.json Oct 6, 2017
LICENSE Hello git Oct 5, 2017
README.md fix: Change to local images and add yarn instructions Aug 26, 2018
index.js Hello git Oct 5, 2017
package-lock.json 1.0.4 Jun 8, 2018
package.json 1.0.4 Jun 8, 2018
yarn.lock Hello git Oct 5, 2017

README.md

react-native-3dcube-navigation

Installation

With Yarn
$ yarn add react-native-3dcube-navigation
With NPM
$ npm i react-native-3dcube-navigation --save

Demo

Basic Usage

Horizontal
import { CubeNavigationHorizontal } from 'react-native-3dcube-navigation'

<View style={styles.father} >
  <CubeNavigationHorizontal ref={view => { this.cube = view; }}>
    <View style={[styles.container, { backgroundColor: '#5CDB8B' }]}>
      <Text style={styles.text}>Horizontal Page 1</Text>
    </View>
    <View style={[styles.container, { backgroundColor: '#A3F989' }]}>
      <Text style={styles.text}>Horizontal Page 2</Text>
    </View>
    <View style={[styles.container, { backgroundColor: '#CBF941' }]}>
      <Text style={styles.text}>Horizontal Page 3</Text>
    </View>
  </CubeNavigationHorizontal>
</View >
Vertical
import { CubeNavigationVertical } from 'react-native-3dcube-navigation'

<View style={styles.father} >
  <CubeNavigationVertical ref={view => { this.cube = view; }}>
    <View style={[styles.container, { backgroundColor: '#5CDB8B' }]}>
      <Text style={styles.text}>Vertical Page 1</Text>
    </View>
    <View style={[styles.container, { backgroundColor: '#A3F989' }]}>
      <Text style={styles.text}>Vertical Page 2</Text>
    </View>
    <View style={[styles.container, { backgroundColor: '#CBF941' }]}>
      <Text style={styles.text}>Vertical Page 3</Text>
    </View>
  </CubeNavigationVertical>
</View >

Properties

Prop Default Type Description
expandView false bool If true, the view expands not showing the background
scrollLockPage null number Lock swipe to the next pages, referring the index number of the page
callBackAfterSwipe null function Callback function after release

Methods

scrollTo(index, animated)

Name Type default Description
index number undefined Scroll to the page, start in 0.
animated bool true

Examples

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

Inspired by tlackemann but implemented only with react-native libs.