All Projects → andrelmlins → Svelte Infinite Scroll

andrelmlins / Svelte Infinite Scroll

Licence: mit
Infinite Scroll Component to Svelte

Projects that are alternatives of or similar to Svelte Infinite Scroll

ng-mat-select-infinite-scroll
Infinite Scroll directive for angular material select component
Stars: ✭ 39 (-61.76%)
Mutual labels:  infinite-scroll, scroll, infinite
vuejs-loadmore
A pull-down refresh and pull-up loadmore scroll component for Vue.js. Vue上拉加载下拉刷新组件
Stars: ✭ 62 (-39.22%)
Mutual labels:  infinite-scroll, scroll, infinite
Infinite Ajax Scroll
Turn your existing pagination into infinite scrolling pages with ease
Stars: ✭ 804 (+688.24%)
Mutual labels:  scroll, infinite-scroll, infinite
Infinitescroll
Infinite Scroll (Endless Scrolling) for RecyclerView in Android
Stars: ✭ 183 (+79.41%)
Mutual labels:  scroll, infinite-scroll, infinite
react-infinite-scroll-list
Manage infinite list with the IntersectionObserver API
Stars: ✭ 20 (-80.39%)
Mutual labels:  infinite-scroll, scroll, infinite
Ngx Ui Scroll
Infinite/virtual scroll for Angular
Stars: ✭ 145 (+42.16%)
Mutual labels:  scroll, infinite-scroll
scrollbox
A lightweight jQuery custom scrollbar plugin, that triggers event when reached the defined point.
Stars: ✭ 15 (-85.29%)
Mutual labels:  infinite-scroll, scroll
angular2-infinite-scroll
Infinite Scroll Directive For Angular (version 2 up to 2.3.1)
Stars: ✭ 16 (-84.31%)
Mutual labels:  infinite-scroll, scroll
Endless
🛣 A lightweight endless pageControl based on CAShapeLayers and UICollectionView
Stars: ✭ 19 (-81.37%)
Mutual labels:  infinite-scroll, infinite
Loopingviewpager
A ViewPager and PagerAdapter combination that support auto scroll, infinite loop and page indicators.
Stars: ✭ 310 (+203.92%)
Mutual labels:  infinite-scroll, infinite
Vue Mugen Scroll
Infinite scroll component for Vue.js 2
Stars: ✭ 532 (+421.57%)
Mutual labels:  scroll, infinite-scroll
Egjs Infinitegrid
A module used to arrange card elements including content infinitely on a grid layout.
Stars: ✭ 751 (+636.27%)
Mutual labels:  infinite, svelte
Ngx Infinite Scroll
Infinite Scroll Directive for Angular
Stars: ✭ 1,024 (+903.92%)
Mutual labels:  scroll, infinite-scroll
React Infinite Calendar
✨ Infinite scrolling date-picker built with React, with localization, range selection, themes, keyboard support, and more.
Stars: ✭ 3,828 (+3652.94%)
Mutual labels:  infinite-scroll, infinite
Rsdayflow
iOS 7+ Calendar (Date Picker) with Infinite Scrolling.
Stars: ✭ 843 (+726.47%)
Mutual labels:  scroll, infinite-scroll
Vue List Scroller
Simple and easy to use Vue.js component for efficient rendering large lists
Stars: ✭ 65 (-36.27%)
Mutual labels:  scroll, infinite-scroll
Hfswipeview
Infinite Swipe View for iOS written in Swift
Stars: ✭ 89 (-12.75%)
Mutual labels:  infinite
Svelte Starter
🍦 A boilerplate for HTML5, Svelte, Material, Babel, and PostCSS. Webpack | Starter Kit | Svelte 3.0 | Svelte3 | Template | Router
Stars: ✭ 97 (-4.9%)
Mutual labels:  svelte
Site Kit
Styles and components for use in *.svelte.dev websites
Stars: ✭ 86 (-15.69%)
Mutual labels:  svelte
Coolify
Heroku & Netlify alternative
Stars: ✭ 85 (-16.67%)
Mutual labels:  svelte

Svelte Infinite Scroll

npm versionLicense: MITBuild StatusNetlify StatusLanguage grade: JavaScriptGitter

Infinite Scroll Component to Svelte.

Installation

npm i svelte-infinite-scroll

// or

yarn add svelte-infinite-scroll

Note: to use this library in Sapper applications, install as devDependency. Take a look at this link.

Demo link

Local demo:

git clone https://github.com/andrelmlins/svelte-infinite-scroll.git
cd svelte-infinite-scroll
npm install && npm run dev

Examples

An example of how to use the library:

<script>
  import InfiniteScroll from "svelte-infinite-scroll";
  import allCountries from "./countries.js";

  let page = 0;
  let size = 20;
  let countries = [];

  $: countries = [
    ...countries,
    ...allCountries.splice(size * page, size * (page + 1) - 1)
  ];
</script>

<style>
  ul {
    width: 400px;
    max-height: 400px;
    overflow-x: scroll;
  }
</style>

<ul>
  {#each countries as country}
    <li>{country.name}</li>
  {/each}
  <InfiniteScroll threshold={100} on:loadMore={() => page++} />
</ul>

Another examples

Properties

Component props:

Prop Type Default Description
threshold number 0 Threshold to call loadMore
elementScroll node - Element to bind scroll
window bool false Bind scroll in window
hasMore bool true Tells you if there are more items to load
horizontal bool false Changing orientation
reverse bool false Revese scroll direction

Events

Event Description
loadMore Tells you if there are more items to load

NPM statistics

Download stats for this NPM package.

NPM

License

Svelte Infinite Scroll is open source software licensed as MIT.

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