0.1.0 • Published 4 years ago

vue-scroll-shadow v0.1.0

Weekly downloads
5
License
MIT
Repository
github
Last release
4 years ago

Vue Scroll Shadow

npm version License: MIT Build Status

Component that customizes the scroll and inserts shadow when scrolling exists

Installation

NPM

npm i vue-scroll-shadow
# or
yarn add vue-scroll-shadow

CDN

<script src="https://unpkg.com/vue-scroll-shadow"></script>

Manual

You can also download and import it manually

<script src="/vue-scroll-shadow/dist/vue-scroll-shadow.min.js"></script>

Module import

import Vue from 'vue';
import ScrollShadow from 'vue-scroll-shadow';

Vue.component('scroll-shadow', ScrollShadow);

Examples

An example of how to use the library:

<template>
  <scroll-shadow>
    <ul>
      <li>Abarth</li>
      <li>Alfa Romeo</li>
      <li>Aston Martin</li>
      <li>Audi</li>
      <li>Bentley</li>
      <li>BMW</li>
      <li>Bugatti</li>
      <li>Cadillac</li>
    </ul>
  </scroll-shadow>
</template>

Properties

Component props:

NameDescriptionTypeRequiredDefault
styleContainer-Stringfalse-
styleSubcontainer-Stringfalse-
scrollColorScroll colorStringfalse#c5c5c5
scrollPaddingLeft scroll paddingStringfalse0px
scrollWidthScroll WidthStringfalse8px
scrollColorHoverScroll color when hoverStringfalse#a6a6a6
shadow-Stringfalse0 2px 4px rgba(0, 0, 0, 0.2) inset, 0 -2px 4px rgba(0, 0, 0, 0.2) inset
isShadowVerify shadow is visibleBooleanfalsetrue

Demo Link

Local demo:

git clone https://github.com/andrelmlins/vue-scroll-shadow.git
cd vue-scroll-shadow
npm install && npm run start

NPM Statistics

Download stats for this NPM package

NPM

License

Vue Scroll Shadow is open source software licensed as MIT.