1.0.1 • Published 4 years ago

svelte-scroll-shadow v1.0.1

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

Svelte Scroll Shadow

npm version License: MIT Build Status Dependencies Netlify Status Language grade: JavaScript

Component that customizes the scroll and inserts shadow when scrolling exists

Installation

npm i svelte-scroll-shadow
// OR
yarn add svelte-scroll-shadow

Note: to use this library in sapper, install as devDependency. See the link.

Demo Link

Local demo:

git clone https://github.com/andrelmlins/svelte-scroll-shadow.git
cd svelte-scroll-shadow
yarn && yarn start

Examples

An example of how to use the library:

<script>
  import ScrollShadow from "svelte-scroll-shadow";
</script>

<ScrollShadow>
  <ul>
    <li>Teste</li>
    <li>Teste</li>
    <li>Teste</li>
    <li>Teste</li>
  </ul>
</ScrollShadow>

Properties

Component props:

PropDefaultTypeDescription
scrollColor#c5c5c5stringScroll color
scrollColorHover#a6a6a6stringScroll color when hover
scrollWidth5numberScroll Width
scrollPadding0numberLeft scroll padding
isShadowtruebooleanView shadow
shadow'0 2px 4px rgba(0, 0, 0, 0.2) inset, 0 -2px 4px rgba(0, 0, 0, 0.2) inset'stringShadow

NPM Statistics

Download stats for this NPM package

NPM

License

Svelte Scroll Shadow is open source software licensed as MIT.

1.0.1

4 years ago

1.0.0

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago