Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/alekseypleshkov/vue-scroll-show

Showing the element if the user reached it after scroll
https://github.com/alekseypleshkov/vue-scroll-show

vue vue-directive vue-plugin vue-scroll vuejs2

Last synced: 8 days ago
JSON representation

Showing the element if the user reached it after scroll

Awesome Lists containing this project

README

        

# Vue Scroll Show

Showing the element if the user reached it after scroll

## Installation

```js
npm i --save-dev vue-scroll-show
```

```js
import VueScrollShow from 'vue-scroll-show'

Vue.use(VueScrollShow)
```

#### SSR (Nuxt.js)

```js
import VueScrollShow from 'vue-scroll-show/dist/ssr.index'

Vue.use(VueScrollShow)
```

## Usage

```html

```

or with options

```html


Show one from parentId
Show two from parentId

Show three without parentId
Show four with offset 500
```

## Directive options

| Option | Description |
| ------ | ------ |
| active | Add classes if element in display area |
| delay | Timeout to add classes to element |
| offset | Screen offset to add class to element |
| parentId | Id parent element for starting add classes to directive elements |