All Projects → tserkov → Vue Scroll Reveal

tserkov / Vue Scroll Reveal

Licence: mit
A Vue directive to wrap @jlmake's excellent ScrollReveal library.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Vue Scroll Reveal

vue-drag-zone
Drag Zone component for @vuejs
Stars: ✭ 127 (-7.97%)
Mutual labels:  vue-directive
Vue.resize
Vue directive to detect resize events with deboucing and throttling capacity.
Stars: ✭ 318 (+130.43%)
Mutual labels:  vue-directive
V Img Fallback
Vue Image Fallback
Stars: ✭ 43 (-68.84%)
Mutual labels:  vue-directive
variantwind
Most elegant way to work with TailwindCSS variants in Vue
Stars: ✭ 45 (-67.39%)
Mutual labels:  vue-directive
Vue Awesome Mui
🏆Mui component for Vue.js(1.x ~ 2.x)
Stars: ✭ 307 (+122.46%)
Mutual labels:  vue-directive
V Click Outside
🔲 Vue directive to react on clicks outside an element without stopping the event propagation
Stars: ✭ 755 (+447.1%)
Mutual labels:  vue-directive
vue-img-orientation-changer
A vue plugin that can help you display image in correct orientation.
Stars: ✭ 38 (-72.46%)
Mutual labels:  vue-directive
Vue Inputmask
Vue.js directive to add inputmask library to your inputs (vanilla javascript).
Stars: ✭ 110 (-20.29%)
Mutual labels:  vue-directive
Vue Easy Slider
Slider Component of Vue.js.
Stars: ✭ 313 (+126.81%)
Mutual labels:  vue-directive
Navscroll Js
Lightweight package for highlighting menu items as you scroll the page, also scrolling to target section when item clicked. Use as a vue component/directive or in vanilla js.
Stars: ✭ 41 (-70.29%)
Mutual labels:  vue-directive
v-lazy-img
simplistic vue.js directive for image lazy loading
Stars: ✭ 25 (-81.88%)
Mutual labels:  vue-directive
Draggable Vue Directive
Vue2 directive that handles drag & drop
Stars: ✭ 286 (+107.25%)
Mutual labels:  vue-directive
Vue Quill Editor
🍡@quilljs editor component for @vuejs
Stars: ✭ 6,874 (+4881.16%)
Mutual labels:  vue-directive
vue-append
vue-append, like v-html directive, but it can call javascript function.
Stars: ✭ 37 (-73.19%)
Mutual labels:  vue-directive
V Animate Css
The easiest to implement Vue directive for Animate.css
Stars: ✭ 59 (-57.25%)
Mutual labels:  vue-directive
shadow
Shadow dom support for Vue
Stars: ✭ 46 (-66.67%)
Mutual labels:  vue-directive
Vuebar
(🗃️ Archived) Vue 2 directive for custom scrollbar that uses native scroll behavior. Lightweight, performant, customizable and without dependencies. Used successfully in production on https://ggather.com
Stars: ✭ 650 (+371.01%)
Mutual labels:  vue-directive
V Directives
vue自定义指令集合
Stars: ✭ 109 (-21.01%)
Mutual labels:  vue-directive
Vue Responsive
A plugin for responsive handling with vue.js
Stars: ✭ 86 (-37.68%)
Mutual labels:  vue-directive
Vue Esc
🏃 Vue.js directive to add a document event listener on escape keyup.
Stars: ✭ 33 (-76.09%)
Mutual labels:  vue-directive

vue-scroll-reveal license

A Vue directive to wrap @jlmakes' excellent ScrollReveal library.

The directive exposes reset, nodesktop, and nomobile as modifiers (ie. v-scroll-reveal.reset.nomobile). All other options can be passed to Vue.use or to individual elements as a value (ie. v-scroll-reveal={ delay: 250 }).

Install

# npm
npm install --save vue-scroll-reveal
# yarn
yarn add vue-scroll-reveal

Use

Remember! Any of the ScrollReveal options can be used!

// In main.js
import VueScrollReveal from 'vue-scroll-reveal';

// Using ScrollReveal's default configuration
Vue.use(VueScrollReveal);

// OR specifying custom default options for all uses of the directive
Vue.use(VueScrollReveal, {
  class: 'v-scroll-reveal', // A CSS class applied to elements with the v-scroll-reveal directive; useful for animation overrides.
  duration: 800,
  scale: 1,
  distance: '10px',
  mobile: false
});
<!-- In a component -->
<template>
  <main>

    <section>
      <h1>Scroll down!</h1>
    </section>

    <!-- This section will reveal itself each time it's scrolled into view -->
    <section v-scroll-reveal.reset>
      <h1>Tada!</h1>
    </section>

    <!-- Element-specific configuration options can be passed like this -->
    <section v-scroll-reveal.reset="{ delay: 250 }">
      <h1>Slightly late tada!</h1>
    </section>

  </main>
</template>

<style>
  section {
    height: 100vh;
  }
</style>

Methods

As of 1.0.4, the isSupported() and sync() methods are exposed via Vue.$sr or this.$sr.

As of 1.0.7, the reveal(target, config, interval, sync) is exposed via Vue.$sr or this.$sr, though using the directive is preferred in order to keep with Vue principles.

Nuxt

If using as a plugin with Nuxt, make sure to disable server-side rendering in nuxt.config.js.

module.exports = {
  plugins: [
    { src: '~/plugins/vue-scroll-reveal', ssr: false }
  ],
}

License

While the code within this component (tserkov/vue-scroll-reveal) is MIT-licensed, ScrollReveal is GPL3-licensed, and requires the purchase of a Commercial License if you want to use it in a closed-source project.

For an explanation of why this component is licensed differently, see #15.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].