⚡️ Blazing fast scrolling for any amount of data

Overview

vue-virtual-scroller

npm npm vue2

Blazing fast scrolling of any amount of data | Live demo | Video demo

For Vue 3 support, see here

💚️ Become a Sponsor

Sponsors

sponsors logos

Table of contents

Installation

npm install --save vue-virtual-scroller

⚠️ vue-virtual-scroller now uses vue-observe-visibility to automatically refresh itself when shown to prevent display glitches. This means you need to include the Intersection Observer polyfill needed by vue-observe-visibility for this to work in old browsers (like Internet Explorer).

Default import

Install all the components:

import Vue from 'vue'
import VueVirtualScroller from 'vue-virtual-scroller'

Vue.use(VueVirtualScroller)

Use specific components:

import Vue from 'vue'
import { RecycleScroller } from 'vue-virtual-scroller'

Vue.component('RecycleScroller', RecycleScroller)

⚠️ The line below should be included when importing the package:

import 'vue-virtual-scroller/dist/vue-virtual-scroller.css'

Browser

<link rel="stylesheet" href="vue-virtual-scroller/dist/vue-virtual-scroller.css"/>

<script src="vue.js"></script>
<script src="vue-virtual-scroller/dist/vue-virtual-scroller.min.js"></script>

If Vue is detected, the plugin will be installed automatically. If not, install the component:

Vue.use(VueVirtualScroller)

Or register it with a custom name:

Vue.component('RecycleScroller', VueVirtualScroller.RecycleScroller)

Usage

There are several components provided by vue-virtual-scroller:

RecycleScroller is a component that only renders the visible items in your list. It also re-uses components and dom elements to be as efficient and performant as possible.

DynamicScroller is a component that wraps the RecycleScroller component and extends its features to include dynamic size management. The main use case for this is when you do not know the size of the items in advance. The Dynamic Scroller automatically "discovers" item dimensions as it renders new items during scrolling.

DynamicScrollerItem must wrap each item in a DynamicScroller to handle size computations.

IdState is a mixin that ease the local state management in reused components inside a RecycleScroller.

RecycleScroller

RecycleScroller is a virtual scroller that only renders the visible items. As the user scrolls, RecycleScroller reuses all components and DOM nodes to maintain optimal performance.

Basic usage

Use the scoped slot to render each item in the list:

<template>
  <RecycleScroller
    class="scroller"
    :items="list"
    :item-size="32"
    key-field="id"
    v-slot="{ item }"
  >
    <div class="user">
      {{ item.name }}
    </div>
  </RecycleScroller>
</template>

<script>
export default {
  props: {
    list: Array,
  },
}
</script>

<style scoped>
.scroller {
  height: 100%;
}

.user {
  height: 32%;
  padding: 0 12px;
  display: flex;
  align-items: center;
}
</style>

Important notes

  • ⚠️ You need to set the size of the virtual-scroller element and the items elements (for example, with CSS). Unless you are using variable size mode, all items should have the same height (or width in horizontal mode) to prevent display glitches.
  • ⚠️ If the items are objects, the scroller needs to be able to identify them. By default it will look for an id field on the items. This can be configured with the keyField prop if you are using another field name.
  • It is not recommended to use functional components inside RecycleScroller since the components are reused (so it will actually be slower).
  • The list item components must be reactive to the item prop being updated without being re-created (use computed props or watchers to properly react to props changes!).
  • You don't need to set key on list content (but you should on all nested <img> elements to prevent load glitches).
  • The browsers have a size limitation on DOM elements, it means that currently the virtual scroller can't display more than ~500k items depending on the browser.
  • Since DOM elements are reused for items, it's recommended to define hover styles using the provided hover class instead of the :hover state selector (e.g. .vue-recycle-scroller__item-view.hover or .hover .some-element-inside-the-item-view).

How does it work?

  • The RecycleScroller creates pools of views to render visible items to the user.
  • A view holds a rendered item, and is reused inside its pool.
  • For each type of item, a new pool is created so that the same components (and DOM trees) are reused for the same type.
  • Views can be deactivated if they go off-screen, and can be reused anytime for a newly visible item.

Here is what the internals of RecycleScroller look like in vertical mode:

<RecycleScroller>
  <!-- Wrapper element with a pre-calculated total height -->
  <wrapper
    :style="{ height: computedTotalHeight + 'px' }"
  >
    <!-- Each view is translated to the computed position -->
    <view
      v-for="view of pool"
      :style="{ transform: 'translateY(' + view.computedTop + 'px)' }"
    >
      <!-- Your elements will be rendered here -->
      <slot
        :item="view.item"
        :index="view.nr.index"
        :active="view.nr.used"
      />
    </view>
  </wrapper>
</RecycleScroller>

When the user scrolls inside RecycleScroller, the views are mostly just moved around to fill the new visible space, and the default slot properties updated. That way we get the minimum amount of components/elements creation and destruction and we use the full power of Vue virtual-dom diff algorithm to optimize DOM operations!

Props

  • items: list of items you want to display in the scroller.
  • direction (default: 'vertical'): scrolling direction, either 'vertical' or 'horizontal'.
  • itemSize (default: null): display height (or width in horizontal mode) of the items in pixels used to calculate the scroll size and position. If it is set to null (the default value), it will use variable size mode.
  • minItemSize: minimum size used if the height (or width in horizontal mode) of a item is unknown.
  • sizeField (default: 'size'): field used to get the item's size in variable size mode.
  • typeField (default: 'type'): field used to differentiate different kinds of components in the list. For each distinct type, a pool of recycled items will be created.
  • keyField (default: 'id'): field used to identify items and optimize managing rendered views.
  • pageMode (default: false): enable Page mode.
  • prerender (default: 0): render a fixed number of items for Server-Side Rendering (SSR).
  • buffer (default: 200): amount of pixel to add to edges of the scrolling visible area to start rendering items further away.
  • emitUpdate (default: false): emit a 'update' event each time the virtual scroller content is updated (can impact performance).

Events

  • resize: emitted when the size of the scroller changes.
  • visible: emitted when the scroller considers itself to be visible in the page.
  • hidden: emitted when the scroller is hidden in the page.
  • update (startIndex, endIndex): emitted each time the views are updated, only if emitUpdate prop is true

Default scoped slot props

  • item: item being rendered in a view.
  • index: reflects each item's position in the items array
  • active: whether or not the view is active. An active view is considered visible and being positioned by RecycleScroller. An inactive view is not considered visible and is hidden from the user. Any rendering-related computations should be skipped if the view is inactive.

Other Slots

<main>
  <slot name="before"></slot>
  <wrapper>
    <!-- Reused view pools here -->
  </wrapper>
  <slot name="after"></slot>
</main>

Example:

<RecycleScroller
  class="scroller"
  :items="list"
  :item-size="32"
>
  <template #before>
    Hey! I'm a message displayed before the items!
  </template>

  <template v-slot="{ item }">
    <div class="user">
      {{ item.name }}
    </div>
  </template>
</RecycleScroller>

Page mode

The page mode expands the virtual-scroller and uses the page viewport to compute which items are visible. That way, you can use it in a big page with HTML elements before or after (like a header and a footer). Set the page-mode prop to true:

<header>
  <menu></menu>
</header>

<RecycleScroller page-mode>
  <!-- ... -->
</RecycleScroller>

<footer>
  Copyright 2017 - Cat
</footer>

Variable size mode

⚠️ This mode can be performance heavy with a lot of items. Use with caution.

If the itemSize prop is not set or is set to null, the virtual scroller will switch to variable size mode. You then need to expose a number field on the item objects with the size of the item element.

⚠️ You still need to set the size of the items with CSS correctly (with classes for example).

Use the sizeField prop (default is 'size') to set the field used by the scroller to get the size for each item.

Example:

const items = [
  {
    id: 1,
    label: 'Title',
    size: 64,
  },
  {
    id: 2,
    label: 'Foo',
    size: 32,
  },
  {
    id: 3,
    label: 'Bar',
    size: 32,
  },
]

Buffer

You can set the buffer prop (in pixels) on the virtual-scroller to extend the viewport considered when determining the visible items. For example, if you set a buffer of 1000 pixels, the virtual-scroller will start rendering items that are 1000 pixels below the bottom of the scroller visible area, and will keep the items that are 1000 pixels above the top of the visible area.

The default value is 200.

<RecycleScroller :buffer="200" />

Server-Side Rendering

The prerender props can be set as the number of items to render on the server inside the virtual scroller:

<RecycleScroller
  :items="items"
  :item-size="42"
  :prerender="10"
>

DynamicScroller

This works just like the RecycleScroller, but it can render items with unknown sizes!

Basic usage

<template>
  <DynamicScroller
    :items="items"
    :min-item-size="54"
    class="scroller"
  >
    <template v-slot="{ item, index, active }">
      <DynamicScrollerItem
        :item="item"
        :active="active"
        :size-dependencies="[
          item.message,
        ]"
        :data-index="index"
      >
        <div class="avatar">
          <img
            :src="item.avatar"
            :key="item.avatar"
            alt="avatar"
            class="image"
          >
        </div>
        <div class="text">{{ item.message }}</div>
      </DynamicScrollerItem>
    </template>
  </DynamicScroller>
</template>

<script>
export default {
  props: {
    items: Array,
  },
}
</script>

<style scoped>
.scroller {
  height: 100%;
}
</style>

Important notes

  • minItemSize is required for the initial render of items.
  • DynamicScroller won't detect size changes on its own, but you can put values that can affect the item size with size-dependencies on DynamicScrollerItem.
  • You don't need to have a size field on the items.

Props

Extends all the RecycleScroller props.

  • It's not recommended to change sizeField prop since all the size management is done internally.

Events

Extends all the RecycleScroller events.

Default scoped slot props

Extends all the RecycleScroller scoped slot props.

Other slots

Extends all the RecycleScroller other slots.

DynamicScrollerItem

The component that should wrap all the items in a DynamicScroller.

Props

  • item (required): the item rendered in the scroller.
  • active (required): is the holding view active in RecycleScroller. Will prevent unnecessary size recomputation.
  • sizeDependencies: values that can affect the size of the item. This prop will be watched and if one value changes, the size will be recomputed. Recommended instead of watchData.
  • watchData (default: false): deeply watch item for changes to re-calculate the size (not recommended, can impact performance).
  • tag (default: 'div'): element used to render the component.
  • emitResize (default: false): emit the resize event each time the size is recomputed (can impact performance).

Events

  • resize: emitted each time the size is recomputed, only if emitResize prop is true.

IdState

This is convenience mixin that can replace data in components being rendered in a RecycleScroller.

Why is this useful?

Since the components in RecycleScroller are reused, you can't directly use the Vue standard data properties: otherwise they will be shared with different items in the list!

IdState will instead provide an idState object which is equivalent to $data, but it's linked to a single item with its identifier (you can change which field with idProp param).

Example

In this example, we use the id of the item to have a "scoped" state to the item:

<template>
  <div class="question">
    <p>{{ item.question }}</p>
    <button @click="idState.replyOpen = !idState.replyOpen">Reply</button>
    <textarea
      v-if="idState.replyOpen"
      v-model="idState.replyText"
      placeholder="Type your reply"
    />
  </div>
</template>

<script>
import { IdState } from 'vue-virtual-scroller'

export default {
  mixins: [
    IdState({
      // You can customize this
      idProp: vm => vm.item.id,
    }),
  ],

  props: {
    // Item in the list
    item: Object,
  },

  // This replaces data () { ... }
  idState () {
    return {
      replyOpen: false,
      replyText: '',
    }
  },
}
</script>

Parameters

  • idProp (default: vm => vm.item.id): field name on the component (for example: 'id') or function returning the id.

License

MIT

Comments
  • fix: avoid infinite loop on scrollToBottom with unknown sized elements

    fix: avoid infinite loop on scrollToBottom with unknown sized elements

    fix #221

    I've changed the termination condition to when the scrollTop value is not changed since the previous update.

    Also added requestAnimationFrame during the loop because we need to wait delayed processing in RecycleView after triggering scroll event and DOM update.

    To check the behavior the scroll to bottom example has been updated not to specify fixed size for each item.

    opened by ktsn 22
  • how to use inside a table which has a header

    how to use inside a table which has a header

    How do i use it within an existing table that has a header?

    Since it wraps the content with two divs, it doesnt work here:

    <table>
      <thead><tr><th>...</th><th>...</th></tr>
      <virtual-scroller content-tag="tbody">
        <template>
            <tr>....</tr>
        <template>
      </virtual-scroller>
    </table>
    

    the content becomes treated as a cell, since it is a div, not a row (tr)

    question 
    opened by tonypee 19
  • Only last item visible

    Only last item visible

    First of all, thank you for the work you're doing. Really appreciate it.

    Anyhow, when updating to the new version and trying to change over to dynamicScroller I get it to scroll smoothly but only the last item (or at least I think it's the last one) is visible. So obviously I'm missing something but I can't find what it is. Worth mentioning is that when I'm scrolling down really fast I can see glimpses of the items but when I scroll back up they're not there anymore.

    Here's my implementation:

    <DynamicScroller
    style="height: 75vh"
    :items="dataToDisplay" 
    :min-item-height="200">
    	<template slot-scope="{ item, index, active }">
    		<DynamicScrollerItem
    		:item="item"
    		:active="active"
    		:data-index="index">
    		
    		    <v-card
    		    style="margin: 10px 0px;"
    		    class="rw-card card-hover">
    			<v-card-actions
    			 style="float: right;">
    				<v-spacer/>
    				<v-btn icon	flat color="error" @click="exclude(item)">
    					<v-icon>close</v-icon>
    				</v-btn>
    			 </v-card-actions>
    	                 <!--- .... all the card content here... -->
    		     </v-card>
    		</DynamicScrollerItem>
    	</template>
    </DynamicScroller>
    

    And importing the components as:

    import { DynamicScroller } from 'vue-virtual-scroller'
    import { DynamicScrollerItem } from 'vue-virtual-scroller'
    
    export default {
    	  props: ["input"],
    	  components:{
    		  DynamicScroller: DynamicScroller,
    		  DynamicScrollerItem: DynamicScrollerItem
    	  },
    

    Anyone got an idea of what I'm doing wrong?

    Addon 1: After further investigation it seems like it's rendering but outside of the viewport. So if i set height: 50% on the scroller i can scroll down and get one element showed and if using pagemode and then scrolling on the page I can scroll down and see everything but one element at the time, so somehow only one item is active.

    opened by karatekaneen 16
  • Insert new item and scroll to the end (chat/stream)

    Insert new item and scroll to the end (chat/stream)

    So I'm currently working on a chat using this package for a more performant solution on how we render our chat items.

    Since chats work a bit different to normal lists I have some issues with the implementation of the automated scrolling when new messages are added. Also updates and resizing just resets the scroll position if changed manually via el.scrollTop = 1000 for example. Do I need to tell the component that the scroll position was updated and needs to be saved?

    scrollToItem isn't working for me, because it always scrolls to the beginning of the item instead of the end. Maybe implementing a scrollToEnd and scrollToStart would be good!

    Here is a codesandbox link: https://codesandbox.io/s/jn121l1n83

    enhancement 
    opened by bdbch 11
  • Future of vue-virtual-scroller

    Future of vue-virtual-scroller

    Hello fellow watchers,

    I'm looking for some maintainers to continue the upkeep of this library along with myself.

    As we are all aware, there's been no releases or commits in this project since May. No issues or pull requests have been taken up. This is to no fault of Akryum – many of us do not pay for this software, and as such he is under no obligation to respond to these tickets.

    However, it goes without saying there are bugs that need fixing, fixes that need merging, and features that need coding, all piling up with nobody to care for them – and all of these need oversight to make sure they're good to go into production.

    I have contacted the maintainer over email to no avail, and his account looks fairly inactive. Until progress resumes on this repo, I have opened a fork at AkryumInfinitum/vue-virtual-scroller where I will start testing and merging PRs, as well as working on issues.

    As time goes on, I may take other popular projects of his that have lost steam and pull them over, which is why it is sitting in its own organization.

    If anyone is interested in being a fellow maintainer of this fork, you can email me at ericjr[email protected]

    opened by EricRabil 9
  • Can I submit a PR for horizontal scroll ?

    Can I submit a PR for horizontal scroll ?

    I've had a brief look through the code, and it seems that it wouldn't be too difficult to support horizontal scrolling, unless there are any technical reasons, of course, as browsers default to vertical.

    I propose:

    • adding a new prop direction to take vertical | horizontal
      • alternatively, axis to take x | y
    • modifying anything to do with height to size
    • adding computed properties for internals which depending on direction return the right values for:
      • height or y
      • width or x

    I'm happy to start this tomorrow as I think it would be the solution to an issue I have right now on a live project.

    Would this be OK @Akryum ?

    question 
    opened by davestewart 9
  • min-item-height problem

    min-item-height problem

    @Akryum Hello! First of all thanks for your great work! It's userful for my program.

    I am using the DynamicScroller component and set its minItemHeight 36px as required. As you say:

    minItemHeight is required for the initial render of items.

    Then I add an element with 79px height (or unknown height) and emit scrollToItem function but its position is not correct. I view the console and find that the component seems to calculate the element(unknown height)'s height as the minItemHeight.

    How can I fix this problem? I am looking forward to your suggestion. Thanks a lot.

    enhancement 
    opened by AceLing 8
  • Height function

    Height function

    TL;DR: Ability to provide a "height function" instead of setting height on an item.

    The API might be the following: <recycle-list :items="items" :height-fn="item => heights[item.id]">.


    My use case is the following. Items come from a computed property items, and they have variable height with a known approximation (e.g. about 50±20px). The exact height is not known until the component is rendered.

    Because of variable height, components emit their desired height for the given item once it is known.

    But because items come from a computed property, I can not directly set the height on the item object. Instead I have a data field heights, and the computed property items populates heights from this data field.

    The downside is that items list is recalculated every time heights is changing, which is quite often. With a "height function", this recalculation will be avoided.

    feature-request 
    opened by simplesmiler 7
  • Blank areas in the project

    Blank areas in the project

    As shown in the figure,I don't know what caused the blank areas in the project. image This is the code I wrote. (GetNoticeList is a computed property)

    <DynamicScroller
          :items="getNoticeList"
          class="notice-list__scroller"
          :min-item-size="45"
          @scroll.native.passive="handleScroll"
          key-field="announce_id">
          <template v-slot="{ item, index, active }">
            <DynamicScrollerItem
              :item="item"
              :active="active"
              class="notice-list__item"
              :watchData="true"
             :size-dependencies="[item.title, item.content_detail]">
              <notice-item
                :notice="item"
                :index="index"
                :key="item.announce_id"
                v-contextmenu:contextmenu
                @cancleMenucontext="cancleMenucontext"
                :isRightMenuShow="isRightMenuShow"
                :isOtherSelected="isOtherSelected"
                >
              </notice-item>
            </DynamicScrollerItem>
          </template>
    </DynamicScroller>
    

    image

    opened by ZhenZY 6
  • Error: Rendered items limit reached

    Error: Rendered items limit reached

    Hello,

    I'm getting this error.

    vue.min.js:6 Error: Rendered items limit reached at o.itemsLimitError (vue-virtual-scroller.min.js:1) at o. (vue-virtual-scroller.min.js:1) at Array. (vue.min.js:6) at Ke (vue.min.js:6)

    Can we make the itemLimit higher ? I tried with 10k

    opened by mathiasleroy 6
  • Is there any way to use this component with items that the height is not known ?

    Is there any way to use this component with items that the height is not known ?

    I have read the docs and it clearly stated that the height of the items needs to be know.

    But I like to ask you directly, if there is any way, to use this component with items that the height cannot be known in advanced ?

    The problem is that I am showing a book with chapters. Each chapter is shown in a card paragraph, but the height is not known. The book may have up to 2000 chapters. (each chapter is not longer then few sentences)

    Rendering 2000 chapters takes up to 10-15 sec and freezes the browser. I do not like to use pagination, so I was thinking to use the virtual scroll. But the problem is that I do not know the height of the chapter in advanced because it can vary based on the text and also based on the view pot width.

    So my question is, is there any way to use this component with items that the height is not know ? Maybe I can calculate the height run time ?

    opened by darkopetreski 6
  • Space between items in the list is wrong

    Space between items in the list is wrong

    Hi,

    I am using the DynamicScroller for a chat app. When I add new items the space between them is not even close as it should be.

    image

    After I destroy and re-creeate the component(page refresh or v-if) it looks well: image

    Something similar happens when I add items at the top.

    I am using Vue 2 and vue-virtual-scroller version 1.0.10

    Any solution for this problem ? Thank you

    opened by dragos-boisteanu 5
  • fix issue with beforeDestroy hook

    fix issue with beforeDestroy hook

    This fixes the issue when the dynamic scroller disappears out of view and the this.$el.parentNode returns nothing causing the observer to have issues, stack trace for current issue follows

    [Vue warn]: Error in beforeDestroy hook: "TypeError: Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element'."

    found in
    
    ---> <DynamicScrollerItem>
           <RecycleScroller>
             <DynamicScroller>
               <SeatSelect> at src/components/SeatSelectComponent.vue
                 <Event> at src/views/Event.vue
                   <App> at src/App.vue
                     <Root>
                     ```
    opened by dsvs12 0
  • Vue 3. `scrollToItem` not working when used in `page-mode`

    Vue 3. `scrollToItem` not working when used in `page-mode`

    When using the vue-3 version, with the following:

    <RecycleScroller ref="scroller" :items="items" :item-size="50" key-field="id" page-mode v-slot="{ item }">
     ...
    

    calling scroller.scrollToItem does nothing (no errors either) If I remove page-mode it works as expected

    opened by brad426 0
  • DynamicScroller goes into an infinite loop bug

    DynamicScroller goes into an infinite loop bug

    System: Vuejs3 build: https://github.com/Akryum/vue-virtual-scroller/tree/next/packages/vue-virtual-scroller

    I have created a minimal recreation of the bug here -> https://stackblitz.com/edit/vitejs-vite-chutjj?file=src/App.vue

    Description of problem: Go to App.vue, and you will see the variable on line#12 = "vertical" All will be fine.

    Now change this variable to "horizontal". And the framework will go into an infinite resizing loop

    ** More information ** The App.vue file has 2 DynamicScrollers. The outter DynamicScroller is Vertical and the inner DynamicScroller is horizontal (after you changed the variable above).

    StackBlitz will not show the infinite loop. But the console log printing this loop is located in the /src/src/components/RecycleScroller.vue on line#147

    opened by patchthecode 0
  • Rewrite view (re-)assignment logic

    Rewrite view (re-)assignment logic

    Description (from primary commit)

    This commit rewrites the view (re-)assignment logic in a way that is shorter and therefore easier to read through. The performance is generally on par with the old implementation. It also fixes bugs in the old logic where:

    • The item itself getting used as the keyField instead of the index.
    • Sometimes a view could get stuck in a corrupted state where its key doesn't match what the index or item indicates.

    These bugs were rather hard to reason about in the old logic due to the redundant code path it had (which weakened the invariants). The new logic unifies paths for simplicity, while keeping the time complexity aspect roughly the same.

    Testing

    I've done some brief tests on this using my own app and it has been working fine, even better because there were some annoying bugs before as described above.

    Not all code paths are exercised in my app though, so additional testing would be useful.

    Reviewing

    This PR is split into a bunch of small refactoring commits that should be trivial to review, and a main commit (fix(RecycleScroller): Rewrite view (re-)assignment logic) after all the refactoring is done. It should be easier to review commit by commit.

    opened by ishitatsuyuki 12
Releases(v1.0.10)
  • v1.0.10(Apr 17, 2020)

  • v1.0.9(Apr 15, 2020)

  • v1.0.7(Apr 15, 2020)

  • v1.0.6(Apr 14, 2020)

    Fixed

    • Item with wrong heights if the scroller is created but hidden while the items are added
    • ssr: template mismatch, closes #343

    Improved

    • sort views after scrolling so text selection is correct, closes #359
    • perf: skip update if the user hasn't scrolled more than min item height
    Source code(tar.gz)
    Source code(zip)
  • v1.0.4(Mar 31, 2020)

  • v1.0.3(Mar 31, 2020)

    New

    • On supported browsers, uses a ResizeObserver to more accurately detect size changes for DynamicScrollerItem

    Improved

    • Improved scrollToBottom implementation

    Fixed

    • Exclude dependencies for esm build (#257, #207)

    Other

    • Updated rollup and build toolchain
    Source code(tar.gz)
    Source code(zip)
  • v1.0.0-rc.2(Feb 21, 2019)

  • v1.0.0-rc.1(Feb 20, 2019)

    BREAKING CHANGES

    • Renamed props in RecycleScroller and DynamicScroller:
    itemHeight => itemSize
    minItemHeight => minItemSize
    heightField => sizeField
    
    • Renamed slots in RecycleScroller and DynamicScroller:
    before-container => before
    after-container => after
    
    • Slot variables changed in DynamicScroller:
    itemWithHeight => itemWithSize
    

    New

    • direction prop (either 'vertical' or 'horizontal')

    Fixed

    • Do not forward keyField prop from DynamicScroller - closes #132 (#133)
    Source code(tar.gz)
    Source code(zip)
  • v1.0.0-beta.7(Feb 20, 2019)

    New

    • DynamicScroller: support simple arrays, closes #108

    Fixed

    • DynamicScroller: round height, closes #118
    • use minHeight instead of height on wrapper, closes #92
    • ssr: document could not be defined, closes #112
    • dynamic scroller: invalidate heights instead of clear, closes #130
    Source code(tar.gz)
    Source code(zip)
  • v1.0.0-beta.6(Feb 19, 2019)

  • v1.0.0-beta.5(Feb 10, 2019)

  • v1.0.0-beta.4(Dec 22, 2018)

  • v1.0.0-beta.3(Dec 21, 2018)

  • v1.0.0-beta.2(Oct 9, 2018)

  • v1.0.0-beta.1(Oct 8, 2018)

    Breaking changes

    • virtual-scroller component is removed (it was much slower than the recycling one, and what we need is more performance!).
    • recycle-list was renamed to RecycleScroller

    New

    • DynamicScroller and DynamicScrollerItem components to create virtual scroller with unknown height items. It's fully automatic! :fire:
    • IdState mixin to ease data management for components inside a recycling scroller (components are reused!)

    Improved

    • Docs are completely reworked.
    Source code(tar.gz)
    Source code(zip)
  • v0.12.2(Oct 4, 2018)

    New

    • <recycle-list>: new hidden event (opposite of visible event).
    • <recycle-list>: add before-container slot

    Improved

    • Updated vue-observe-visibility

    Fixed

    • The default target for IOS should be body, closes #73 (#85)
    Source code(tar.gz)
    Source code(zip)
  • v0.12.0(Jun 2, 2018)

  • v0.11.0(Jan 25, 2018)

  • v0.10.5(Oct 30, 2017)

  • v0.10.4(Oct 26, 2017)

    New

    • New 'visible' event emitted when the scroller becomes visible
    • The behavior introduced in 0.10.2 (defer removing previous items) is now disabled by default and enabled with the delay-previous-items boolean prop.
    Source code(tar.gz)
    Source code(zip)
  • v0.10.2(Oct 26, 2017)

    New

    • A 'resize' event is emitted when the virtual-scroller size changes
    • New refs: vm.$refs.itemContainer and vm.$refs.items for the container elements.

    Improved

    • buffer is now applied around the pool.
    • Some unnecessary updates are now skipped.
    • The previous items are removed the next frame. This fixes nasty issues when dealing with items that change their height multiple times or contain horrible things like iframes.
    • The first update is now skipped if the scroller has been rendered on the server.
    • Source code: Some syntax and code style changes.
    Source code(tar.gz)
    Source code(zip)
  • v0.10.1(Oct 24, 2017)

    Breaking changes

    • buffer and poolSize are now in pixels and work for both fixed and variable heights modes.

    New

    • emitUpdate boolean prop to enable the new update event when the rendered item list changes.

    Improved

    • Now built using rollup instead of webpack.
    • Distribution files availables: browser, UMD and ES Module.
    Source code(tar.gz)
    Source code(zip)
  • v0.9.0(Sep 18, 2017)

  • v0.8.1(Aug 3, 2017)

    New

    • SSR support
    • New prerender prop (doc)

    Fixes

    • Default import for bundlers that supports modules
    • Handle window resizing in page mode
    • Some initialization issues
    Source code(tar.gz)
    Source code(zip)
  • v0.7.7(Jul 13, 2017)

  • v0.7.5(Jun 27, 2017)

  • v0.7.1(Jun 27, 2017)

  • v0.7.0(Jun 27, 2017)

  • v0.5.1(Jan 9, 2017)

  • v0.4.0(Dec 23, 2016)

Owner
Guillaume Chau
Web & JavaScript enthusiast, @vuejs core team.
Guillaume Chau
Top bar indicating amount of content scrolled

Scrol indicator for vue.js apps Demo See DEMO here Install Run npm install vue-content-scroll-progress --save Usage Add in the component import MyScro

Mikhail Kuznetcov 25 Jul 30, 2022
A simple web component (Vue.js >= 3.2) that provides infinite scrolling to display a large array of data one element at a time

infinite-scroller-comp infinite-scroller-comp is a Vue.js (>=3.2) web component that provides a content area and an associated vertical scroll bar. Th

null 0 May 10, 2022
A Vue.js directive for body scroll locking without breaking scrolling of a target element.

v-scroll-lock A Vue.js directive for body scroll locking (for iOS Mobile and Tablet, Android, desktop Safari/Chrome/Firefox) without breaking scrollin

Pete Hegman 182 Oct 1, 2022
Lightweight and simple to use vue component that highlights menu items as you scroll the page, also scrolling to target section when clicked.

vue-scrollactive This component makes it simple to highlight a menu item with an 'active' class as you scroll. Highlights items with a class as you sc

Mauricio Farias Dziedzinski 531 Sep 27, 2022
Lightweight package for highlighting menu items as you scroll the page, also scrolling to target section when item clicked. Use as a vue component/directive or in vanilla js.

navscroll-js Installation This package is available on npm. Using npm: npm install --save navscroll Using yarn: yarn add navscroll Directly include it

Honoré Nintunze 57 Mar 2, 2022
Customize the scrolling position on route navigation. Especially hash mode.

vue-scroll-behavior Customize the scrolling position on route navigation IE / Edge Firefox Chrome Safari Opera iOS Android IE9+, Edge ✓ ✓ ✓ ✓ ✓ ✓ Tabl

Yazhe Wang 142 Jul 10, 2022
:beginner:A simple, seamless scrolling for Vue.js vue无缝滚动component

vue-seamless-scroll A simple, Seamless scrolling for Vue.js Features Initial configuration support Compatible with multiple platforms Multi-technology

sos 1.5k Oct 2, 2022
⌨️ A Safari browser extension, use keyboard control browser jumps, scrolling, switching tabs and more. support iPadOS and macOS

Support Keyboard Key Description k Scroll up j Scroll down u Fast scroll up d Fast scroll down h Scroll left l Scroll right f Highlight shift Open lin

Haojen 34 Oct 4, 2022
Starter template for parallax effects & smooth scrolling experience

Nuxt + Locomotive Scroll Starter template for parallax effects & smooth scrolling experience. Empower your Nuxt project in no time. See it in action →

Ivo Dolenc 36 Sep 27, 2022
Vue component that provides content scrolling and zooming using mouse events or two fingers pinch on a mobile devices

vue-pinch-scroll-zoom Vue component that provides content scrolling and zooming using mouse events or two fingers pinch on a mobile devices example: h

CoddiCat 24 Sep 9, 2022
Component that customizes the scroll and inserts shadow when scrolling exists

Vue Scroll Shadow • • Component that customizes the scroll and inserts shadow when scrolling exists Installation NPM npm i vue-scroll-shadow # or yarn

André Lins 2 Feb 13, 2022
Lightweight and simple to use vue component that highlights menu items as you scroll the page, also scrolling to target section when clicked.

vue-scrollactive This component makes it simple to highlight a menu item with an 'active' class as you scroll. Highlights items with a class as you sc

Mauricio Farias Dziedzinski 531 Sep 27, 2022
A Vue.js directive for body scroll locking without breaking scrolling of a target element.

v-scroll-lock A Vue.js directive for body scroll locking (for iOS Mobile and Tablet, Android, desktop Safari/Chrome/Firefox) without breaking scrollin

Pete Hegman 181 Aug 30, 2022
A Vue directive to lock the body scroll without stopping the target element from scrolling

A Vue directive to lock the body from scrolling without stopping the target element from scrolling

Bram Honingh 30 Jul 10, 2022
Lightweight Vue plugin for smooth-scrolling extended from vue-smooth-scroll

Vue2 Smooth Scroll Lightweight Vue plugin for smooth-scrolling extended from vue-smooth-scroll. For simple use-cases, the native scroll-behavior CSS p

xlaoyu 119 Aug 22, 2022
Animating vertical and horizontal scrolling

Animating vertical and horizontal scrolling. Inspired by rigor789/vue-scrollto and uses some of its code and functionality!!

Uther Pally 63 Sep 16, 2022
Vue-slidePage is a fullscreen scrolling component of Vue.js, Based on slidePage

vue-slidePage Introduction vue-slidePage is a fullscreen scrolling component of Vue.js, Based on slidePage Demo simple custom Usage Install $ npm i -S

null 16 Nov 12, 2021
Vue plugin to disable scrolling page

Vue plugin to disable scrolling page

17axaH 0 May 12, 2021
A Vue plugin which supervises binding element's scrolling and trigger target elements class

A Vue plugin which supervises binding element's scrolling and trigger target elements class

null 0 Nov 27, 2020