A Vue.js(v2.x+) integration of http://leafo.net/sticky-kit/
See also https://imfaber.me/lab/sticky-kit-plugin-vuejs
Install the npm package.
$ npm install vue-stickykit --saveRegister the component.
- ES5
var Vue = require('vue')
var VueStickyKit = require('vue-stickykit')
Vue.use(VueStickyKit)- ES6
import Vue from 'vue'
import VueStickyKit from 'vue-stickykit'
Vue.use(VueStickyKit)<template>
    <div v-stick-in-parent>
        My sticky content
    </div>
</template><template>
    <div v-stick-in-parent="stikyKit">
        My sticky content
    </div>
</template>
<script>
    export default {
        data () {
          return {
            // See http://leafo.net/sticky-kit/#reference
            stikyKit: {
              options: {
                parent: '.my-sticky-class',
                offset_top: 50
              },
              on: {
                'sticky_kit:stick': function(e) {
                  console.log("has stuck!", e.target);
                },
                'sticky_kit:unstick': function(e) {
                  console.log("has unstuck!", e.target);
                },
              }
            }
          }
        },
    }
</script>The code is available under the MIT license.