0.1.8 • Published 5 years ago

vue-coe-scrollbar v0.1.8

Weekly downloads
1
License
MIT
Repository
-
Last release
5 years ago

Competitive Diferentials

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

0.1.8

5 years ago

0.1.7

5 years ago

0.1.6

5 years ago

0.1.5

5 years ago

0.1.4

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago