New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

vue-smoothscroll

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-smoothscroll

it's a vuejs version of smoothscroll

0.2.0
latest
Source
npm
Version published
Weekly downloads
526
-22.99%
Maintainers
1
Weekly downloads
 
Created
Source

vue-smoothscroll

it's a vuejs version of smoothscroll Based on https://github.com/alicelieutier/smoothScroll/blob/master/smoothscroll.js

How to Use

# install dependencies
npm install vue-smoothscroll

then in the js file , you can use with router or others

var vueSmoothScroll = require('vue-smoothscroll');
Vue.use(vueSmoothScroll);

   //define a tag
   <div v-smoothscroll="{ duration : 500, callback: callback , context : undefined , axis :'y' }" class="message">
       message
   </div>

or

    this.$SmoothScroll(target,duration,callback,context,axis);

params

  • target is a HTMLElement Object from your document that you want to scroll to, or a numeric position on the page
  • duration is the total duration of the scroll (optional, defaults to 500ms)
  • callback is a function to be executed when the scrolling is over (optional)
  • context is the scrolling context (optional, defaults to window, can be any HTMLElement Object)
  • axis is the x,y axis ,the value can be 'y' , 'x' , 'both', 'y' means horizontal direction, 'x' means vertical direction

FAQs

Package last updated on 09 Jul 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts