Giter Site home page Giter Site logo

vue3-scroll-shadow's Introduction

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

Name Type Default Description
height String '100%' Height of container
throttleWait Number 100 Handle scroll event at most once per throttleWait milliseconds
shadowColorFrom String '#00000014' Start color of scroll shadow. Can be RGB or RGBA:
- #000
- #000000
- #0004
- #00000044
shadowColorTo String 'transparent' End color of scroll shadow. Same as above
shadowSize String '15px' Size of shadow

Slot Attributes

Name Value Description
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>

vue3-scroll-shadow's People

Contributors

tomatoguy0502 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.