All Projects → eberhara → react-bidirectional-infinite-scroll

eberhara / react-bidirectional-infinite-scroll

Licence: other
Bidirectional infinite scroll written using react

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to react-bidirectional-infinite-scroll

infinite view pager
📜Infinite View Pager widget for Flutter
Stars: ✭ 26 (-16.13%)
Mutual labels:  infinite-scroll, infinite-lists
react-infinite-scroll-list
Manage infinite list with the IntersectionObserver API
Stars: ✭ 20 (-35.48%)
Mutual labels:  infinite-scroll, infinite-lists
react-native-paginated-listview
A simple paginated react-native ListView with a few customization options
Stars: ✭ 14 (-54.84%)
Mutual labels:  infinite-scroll
Pageable
An easy way to Pagination or Infinite scrolling for TableView/CollectionView
Stars: ✭ 44 (+41.94%)
Mutual labels:  infinite-scroll
go-grpc-bidirectional-streaming-example
gRPC bidirectional streaming example written in golang
Stars: ✭ 83 (+167.74%)
Mutual labels:  bidirectional
tomland
🏝 Bidirectional TOML serialization
Stars: ✭ 103 (+232.26%)
Mutual labels:  bidirectional
Endless
🛣 A lightweight endless pageControl based on CAShapeLayers and UICollectionView
Stars: ✭ 19 (-38.71%)
Mutual labels:  infinite-scroll
el-table-infinite-scroll
Infinite scroll for el-table.
Stars: ✭ 81 (+161.29%)
Mutual labels:  infinite-scroll
ScrollAnimationShowcase
[ING] - UIScrollViewやUICollectionViewの特性を活用した表現サンプル
Stars: ✭ 15 (-51.61%)
Mutual labels:  infinite-scroll
postcss-bidirection
PostCSS plugin that polyfill Bi-directional CSS properties and values to suppot rtl and ltr rules in all browsers
Stars: ✭ 24 (-22.58%)
Mutual labels:  bidirectional
react-native-bidirectional-infinite-scroll
📜 React Native - Bidirectional Infinite Smooth Scroll
Stars: ✭ 137 (+341.94%)
Mutual labels:  infinite-scroll
SwiftUI-Flux
🚀 This is a tiny experimental application using SwiftUI with Flux architecture.
Stars: ✭ 52 (+67.74%)
Mutual labels:  bidirectional
InfiniteCarousel
💈Infinite Carousel Collection View
Stars: ✭ 67 (+116.13%)
Mutual labels:  infinite-scroll
vue-virtual-scroll-grid
A Vue 3 component that can render a list with 1000+ items as a grid in a performant way.
Stars: ✭ 64 (+106.45%)
Mutual labels:  infinite-scroll
ironhide
Ironhide, the data transformer. Main repo:
Stars: ✭ 16 (-48.39%)
Mutual labels:  bidirectional
react-example-paginated-list-infinite-scroll
Follow a React tutorial series with three parts to build a powerful component in React.
Stars: ✭ 43 (+38.71%)
Mutual labels:  infinite-scroll
react-simple-infinite-loading
A list that infinitely loads content as user scrolls down in React
Stars: ✭ 56 (+80.65%)
Mutual labels:  infinite-scroll
react-native-carousel
React Native carousel
Stars: ✭ 35 (+12.9%)
Mutual labels:  infinite-scroll
react-tabllist
React-based customizable style table or list components that support event and callback functions.
Stars: ✭ 20 (-35.48%)
Mutual labels:  infinite-scroll
WWW2020-grec
Future Data Helps Training: Modeling Future Contexts for Session-based Recommendation
Stars: ✭ 17 (-45.16%)
Mutual labels:  bidirectional

react-bidirectional-infinite-scroll

Travis node version npm package Coveralls

Bidirectional infinite scroll written using react

This is a react library that handles infinite scrolling in two directions at the same time: UP/DOWN or LEFT/RIGHT.

See it working at eberhara.github.io/react-bidirectional-infinite-scroll/.

Installation

npm i --save react-bidirectional-infinite-scroll

Usage

import InfiniteScroll from 'react-bidirectional-infinite-scroll'

...

render() {
  return (
    // Vertical infinite scroll
    <InfiniteScroll onReachBottom={f => f} onReachTop={f => f} >
      // ... here goes your infinite list
    </InfiniteScroll>

    // Horizontal infinite scroll
    <InfiniteScroll onReachLeft={f => f} onReachRight={f => f} horizontal>
      // ... here goes your infinite list
    </InfiniteScroll>
  )
}

More examples

import InfiniteScroll from 'react-bidirectional-infinite-scroll'

...

handleHorizontalScroll = (position, previousPosition) => {
  const diffScroll = position - previousPosition
  const direction = diffScroll > 0
    ? 'right'
    : 'left'

  console.log(`Scroll ${direction} to ${position}`)
}

handleVerticalScroll = (position, previousPosition) => {
  const diffScroll = position - previousPosition
  const direction = diffScroll > 0
    ? 'down'
    : 'up'

  console.log(`Scroll ${direction} to ${position}`)
}

render() {
  return (
    // Vertical scroll verifying scroll direction
    <InfiniteScroll onScroll={this.handleVerticalScroll}>
      // ... here goes your infinite list
    </InfiniteScroll>

    // Horizontal scroll verifying scroll direction
    <InfiniteScroll onScroll={this.handleHorizontalScroll} horizontal>
      // ... here goes your infinite list
    </InfiniteScroll>

    // Scroll overwriting scroll position (px)
    <InfiniteScroll position={100}>
      // ... here goes your infinite list
    </InfiniteScroll>
  )
}

Take a look at examples folder for a complete example.

Contributing

Check CONTRIBUTING for guidance.

License

MIT License

Copyright (c) 2017 Andre Eberhardt

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

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