All Projects → egoist → Vue Mugen Scroll

egoist / Vue Mugen Scroll

Licence: mit
Infinite scroll component for Vue.js 2

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Vue Mugen Scroll

Ngx Infinite Scroll
Infinite Scroll Directive for Angular
Stars: ✭ 1,024 (+92.48%)
Mutual labels:  scroll, infinite-scroll
Svelte Infinite Scroll
Infinite Scroll Component to Svelte
Stars: ✭ 102 (-80.83%)
Mutual labels:  scroll, infinite-scroll
Rsdayflow
iOS 7+ Calendar (Date Picker) with Infinite Scrolling.
Stars: ✭ 843 (+58.46%)
Mutual labels:  scroll, infinite-scroll
Infinite Ajax Scroll
Turn your existing pagination into infinite scrolling pages with ease
Stars: ✭ 804 (+51.13%)
Mutual labels:  scroll, infinite-scroll
scrollbox
A lightweight jQuery custom scrollbar plugin, that triggers event when reached the defined point.
Stars: ✭ 15 (-97.18%)
Mutual labels:  infinite-scroll, scroll
Ngx Ui Scroll
Infinite/virtual scroll for Angular
Stars: ✭ 145 (-72.74%)
Mutual labels:  scroll, infinite-scroll
Vue List Scroller
Simple and easy to use Vue.js component for efficient rendering large lists
Stars: ✭ 65 (-87.78%)
Mutual labels:  scroll, infinite-scroll
ng-mat-select-infinite-scroll
Infinite Scroll directive for angular material select component
Stars: ✭ 39 (-92.67%)
Mutual labels:  infinite-scroll, scroll
vuejs-loadmore
A pull-down refresh and pull-up loadmore scroll component for Vue.js. Vue上拉加载下拉刷新组件
Stars: ✭ 62 (-88.35%)
Mutual labels:  infinite-scroll, scroll
Infinitescroll
Infinite Scroll (Endless Scrolling) for RecyclerView in Android
Stars: ✭ 183 (-65.6%)
Mutual labels:  scroll, infinite-scroll
angular2-infinite-scroll
Infinite Scroll Directive For Angular (version 2 up to 2.3.1)
Stars: ✭ 16 (-96.99%)
Mutual labels:  infinite-scroll, scroll
react-infinite-scroll-list
Manage infinite list with the IntersectionObserver API
Stars: ✭ 20 (-96.24%)
Mutual labels:  infinite-scroll, scroll
React Scrollspy
🔯 react scrollspy component
Stars: ✭ 382 (-28.2%)
Mutual labels:  scroll
Use Scroll Position
Use scroll position ReactJS hook done right
Stars: ✭ 414 (-22.18%)
Mutual labels:  scroll
Scrollreveal
Animate elements as they scroll into view.
Stars: ✭ 20,264 (+3709.02%)
Mutual labels:  scroll
Jxpagelistview
高仿闲鱼、转转、京东、中央天气预报等主流APP列表底部分页滚动视图
Stars: ✭ 377 (-29.14%)
Mutual labels:  scroll
Vegile
This tool will setting up your backdoor/rootkits when backdoor already setup it will be hidden your spesisifc process,unlimited your session in metasploit and transparent. Even when it killed, it will re-run again. There always be a procces which while run another process,So we can assume that this procces is unstopable like a Ghost in The Shell
Stars: ✭ 478 (-10.15%)
Mutual labels:  infinite-scroll
Scrollload
scroll bottom load more data pull refresh 滚动到底部加载更多数据 下拉刷新
Stars: ✭ 411 (-22.74%)
Mutual labels:  scroll
Hc Sticky
JavaScript library that makes any element on your page visible while you scroll.
Stars: ✭ 375 (-29.51%)
Mutual labels:  scroll
Mac Mouse Fix
Mac Mouse Fix - A simple way to make your mouse better.
Stars: ✭ 362 (-31.95%)
Mutual labels:  scroll

vue-mugen-scroll NPM version NPM downloads Build Status

むげん [mugen] means Infinity in English.

Features

  • Small, only weighs 2kb
  • Insanely easy to use, it's just a component with a couple props

Install

$ npm install --save vue-mugen-scroll

CDN: https://unpkg.com/vue-mugen-scroll/dist/

Demo: JSFiddle

Usage

<template>
  <div id="app">
    <div class="list">your list of items</div>
    <!-- add the component right after your list -->
    <mugen-scroll :handler="fetchData" :should-handle="!loading">
      loading...
    </mugen-scroll>
  </div>
</template>

<script>
  import MugenScroll from 'vue-mugen-scroll'
  export default {
    data() {
      // do not run handler when it's loading
      return {loading: false}
    },
    methods: {
      fetchData() {
        this.loading = true
        // ... the code you wanna run to fetch data
        this.loading = false
      }
    },
    components: {MugenScroll}
  }
</script>

API

props

handler

Type: function
Required: true

The handler function to run after you scroll to the bottom of the list. It will also be invoked on component mounted and the mugen-scroll component is visible in viewport.

handleOnMount

Type: boolean
Default: true

Invoke the handler function on component mounted.

shouldHandle

Type: boolean
Default: true

Add an additional condition to check if it should invoke the handler function, for example you don't want it to be invoked again as it's loading.

threshold

Type: number
Default: 0

Set the ratio of the <mugen-scroll>'s height and width that needs to be visible for it to be considered in viewport. This defaults to 0, meaning any amount. A threshold of 0.5 or 1 will require that half or all, respectively, of the element's height and width need to be visible. threshold must be a number between 0 and 1

scrollContainer

Type: string

If the container of your list is scrollable, you can specific the reference ID of the container, so that we can detect the scroll event of this element instead of window.

<template>
  <div class="wrap"
    <!-- the container is scrollable here -->
    style="height: 200px; overflow: auto;"
    <!-- add the ref -->
    ref="wrap">
    <div class="list"><!-- your list --></div>
    <mugen-scroll
      <!-- pass the ref id -->
      scroll-container="wrap">
      Loading...
    </mugen-scroll>
  </div>
</template>

Development

You can run the example with vbuild

git clone https://github.com/egoist/vue-mugen-scroll.git
cd vue-mugen-scroll
yarn
yarn example

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

License

MIT © EGOIST

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