Skip to content

andrelmlins/svelte-scroll-shadow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Svelte Scroll Shadow

npm versionLicense: MITBuild StatusDependenciesNetlify StatusLanguage 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
npm install && npm run dev

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:

Prop Default Type Description
scrollColor #c5c5c5 string Scroll color
scrollColorHover #a6a6a6 string Scroll color when hover
scrollWidth 5 number Scroll Width
scrollPadding 0 number Left scroll padding
isShadow true boolean View shadow
shadow '0 2px 4px rgba(0, 0, 0, 0.2) inset, 0 -2px 4px rgba(0, 0, 0, 0.2) inset' string Shadow

NPM Statistics

Download stats for this NPM package

NPM

License

Svelte Scroll Shadow is open source software licensed as MIT.

About

Component that customizes the scroll and inserts shadow when scrolling exists

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •