Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vue-coe-scrollbar

Package Overview
Dependencies
Maintainers
2
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-coe-scrollbar

vue-coe-scrollbar ✅

  • 0.1.8
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
9
increased by50%
Maintainers
2
Weekly downloads
 
Created
Source

vue-coe-scrollbar ✅

License


Example


Competitive Diferentials

  • keyboard support
  • bundle size: 2.2kB
  • built with poi and bili
  • native style and behavior
  • clean and documented code
  • compatibility SSR -ty @vinicius73
  • state-based, preventing re-paint -ty @vinicius73
  • based on transform, property calculated on GPU: ty, @VitorLuizC
  • use requestAnimationFrame to improve scrolling animation performance

Install

yarn add vue-coe-scrollbar or npm install vue-coe-scrollbar

Example

<template>
  <vue-coe-scrollbar @scroll="scroll">
    <div class="list">
      <div v-for="x in content" :key="x" class="list__item">
        {{ x }}
      </div>
    </div>
  </vue-coe-scroll>
</template>

<script>
import VueCoeScrollbar from 'vue-coe-scrollbar'

export default {
  components: { VueCoeScrollbar },

  data () {
    return {
      content: Array.from(({ length: 12 }), (x, i) => i)
    }
  },

  methods: {
    scroll (e) { // ... }
  }
}
</script>

Props

NametypedefaultAbout
activeBooleantrueDisable scroll if false
wrapperSelectorStringvue-coe-scroll > .wrapperany changes inside this element will recalculate the scroll
initDelayNumber0delay to avoid wasted resources when mounting the scroll
jumpNumber700Jump on click
disappearNumber1500The delay before scrollbar hides
scrollDurationNumber300The transition time on click/keydown (ms)
speedNumber0.1The scroll wheel speed ratio
widthNumber7scrollbar width base
colorStringrgba(18, 30, 73, 0.2)scrollbar color
backgroundStringtransparentscrollbar background

Disclaimer: there is a bit more elaborate documentation in the code

Event

NameAbout
scrollEmit event on scroll

Contributors

Made in: @convenia

FAQs

Package last updated on 18 Sep 2019

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

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc