Socket
Socket
Sign inDemoInstall

vue-scroll-bar

Package Overview
Dependencies
16
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    vue-scroll-bar

a simple custom scrollbar vue component


Version published
Weekly downloads
102
decreased by-35.85%
Maintainers
1
Install size
1.94 MB
Created
Weekly downloads
 

Readme

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

FAQs

Last updated on 26 Mar 2020

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc