vue-fluid-scroll
Vue Component for creating fluid scroll. Sometimes you need to scroll with the scrollbar, but the scrolling not fluid enough (because there's a 'step' when you scroll. You want it smoothly transitioned. This is what you need!
Installation
npm install --save vue-fluid-scroll
or
yarn add vue-fluid-scroll
Import
Global Registration
Vue
In Component Registration:
...
Not Using Webpack
If you don't use webpack (for example in CodePen etc):
or use unpkg
and then you still need to register it:
Vue
Basic Usage
VueFluidScroll uses VueFakeScroll, maybe you want to read the documentation about that to see how it works.
You can treat this component as a normal div, and because you want to make scrollable area, you need to specify the dimension width
and height
of this component.
...
Example
See the Demo and the corresponding code
Caveats
It has the same caveats as VueFakeScroll
, you can read it here.
You can style the component with the margin
and border
, but please don't style it with padding
, because it behaves a little bit different than regular div. If you need a padding
, just make a div
as a direct child of this component, and set the width
and height
to 100%
and then you can put the padding
in this div
.
Example:
... another child here