🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

vue-scroll-bar

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-scroll-bar

a simple custom scrollbar vue component

1.2.4
latest
Source
npm
Version published
Weekly downloads
85
-24.11%
Maintainers
1
Weekly downloads
 
Created
Source

vue-scroll-bar

npm Build Status NPM version Downloads

a simple custom scrollbar vue component, it can support pc and mobile.

show-y

show-x

DEMO

Install

npm i vue-scroll-bar --save

Usage


<template>
   <scroll-bar class="warp" :scrollTrackStyle="scrollTrackStyle" :scrollBarStyle="scrollBarStyle">
      <div class="test">
        <p v-for="index in 6">
           item no {{index}}
        </p>
      </div>
   </scroll-bar>
</template>

import scrollBar from 'vue-scroll-bar';
export default {
    components: { scrollBar },
    data() {
      return {
        scrollTrackStyle: {
          backgroundColor: 'red'
        },
        scrollBarStyle: {
         ...
        }
      };
    }
};
<style>
.warp{
  height: 80px;
  overflow: hidden;
}
</style>

Props

PropsTypeDefaultDescription
scrollTrackStyleObject{}the style of scroll track
scrollTrackYStyleObjectscrollTrackStylethe style of scroll track in the direction of Y axis
scrollTrackXStyleObjectscrollTrackStylethe style of scroll track in the direction of X axis
scrollBarStyleObject{}the style of scroll bar
scrollBarYStyleObjectscrollBarStylethe style of scroll bar in the direction of Y axis
scrollBarXStyleObjectscrollBarStylethe style of scroll bar in the direction of X axis
barYMinHeightNumber20the min height of scroll bar in the direction of Y axis
barXMinWidthNumber20the min width of scroll bar in the direction of X axis
overflowString'auto''auto', 'hidden', 'hidden-x', 'hidden-y'
watchValueAnynullwhen content expands, bar would be refreshed
mobileBooleanfalsescrollbar will be forced to show in mobile mode when it is set to true

Keywords

vue-scroll-bar

FAQs

Package last updated on 26 Mar 2020

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