A Vue component to automatically scroll (and optionally loop) containing elements.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
demo
dist
src
.babelrc
.gitignore
README.md
package.json
webpack.config.js
yarn.lock

README.md

vue-plugin-autoscroll

View Demo

Installation

npm install --save vue-plugin-autoscroll

Usage

Import the package and activate the plugin

import Vue from "vue"
import AutoScroll from "vue-plugin-autoscroll"

Vue.use(AutoScroll)

new Vue({
  el: "#app"
})

In your markup, make sure to wrap your entire page content

<div id="app">
  <auto-scroll :loop="true" :loop-up="false" :slow="false">
    <section>
      1
    </section>
    <section>
      2
    </section>
    <section>
      3
    </section>
  </auto-scroll>
</div>

Removing The Scrollbar

The following works for WebKit browsers

::-webkit-scrollbar { 
  display: none; 
}

Optional Props

Prop Type Default
loop Boolean true
loopUp Boolean false
slow Boolean false

License

MIT