0.1.2 • Published 4 years ago

vue3-scroll-shadow v0.1.2

Weekly downloads
-
License
-
Repository
github
Last release
4 years ago

Vue 3 Scroll Shadow

Add UX-friendly shadow to your scrollable list

Installation

npm i vue3-scroll-shadow

Usage

import VueScrollShadow from 'vue3-scroll-shadow'
<template>
  <vue-scroll-shadow>
    <!-- Your content goes here -->
  </vue-scroll-shadow>
</template>

Props

NameTypeDefaultDescription
heightString'100%'Height of container
throttleWaitNumber100Handle scroll event at most once per throttleWait milliseconds
shadowColorFromString'#00000014'Start color of scroll shadow. Can be RGB or RGBA: - #000 - #000000 - #0004 - #00000044
shadowColorToString'transparent'End color of scroll shadow. Same as above
shadowSizeString'15px'Size of shadow

Slot Attributes

NameValueDescription
scrollState{ isOffTop: Boolean , isOffBottom: Boolean }When the list is scrollable, isOffTop is true when not at the top, isOffBottom is true when not at the bottom

Example

<vue-scroll-shadow v-slot="{ scrollState }">
  // you can use scrollState.isOffTop or scrollState.isOffBottom here
</vue-scroll-shadow>
0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago