Inspired by https://github.com/brentvatne/react-native-scrollable-tab-view
npm install react-native-scrollable-viewInspired by https://github.com/brentvatne/react-native-scrollable-tab-view
I want to use scrollable view without tab. I cannot find react-native plugin
so I forked react-native-scrollable-tab-view and strip of tab component.
Thanks @brentvatne!
Tested with react-native 0.20
1. Run npm install react-native-scrollable-view --save
2. var ScrollableTabView = require('react-native-scrollable-tab-view');
``javascript
var ScrollableView = require('react-native-scrollable-view');
var App = React.createClass({
render() {
return (
);
}
});
`
See
examples/FacebookTabsExample.
- onChangePage _(Function)_ - function to call when Page changes, should accept 1 argument which is an Object containing two keys: i: the index of the tab that is selected, ref: the ref of the tab that is selectedonScroll
- _(Function)_ - function to call when the pages are sliding, should accept 1 argument which is an Float number representing the page position in the slide frame.locked
- _(Bool)_ - disables horizontal dragging to scroll between tabs, default is false.initialPage
- _(Integer)_ - the index of the initially selected tab, defaults to 0 === first tab.page
- _(Integer)_ - set selected page(can be buggy see #126style
- _(View.propTypes.style)_contentProps
- _(Object)_ - props that are applied to root ScrollView/ViewPagerAndroid`. Note that overriding defaults set by the library may break functionality; see the source for details.
---
MIT Licensed