A directive to sticky element for vue.js(2.x).
for useage with Vue 1.x, see the 2.x branch
npm install vue-sticky --save
run npm install
and npm run dev
import VueSticky from 'vue-sticky' // Es6 module
const VueSticky = VueSticky.default // Global variable
directives: {
'sticky': VueSticky,
},
<ELEMENT v-sticky="{ zIndex: NUMBER, stickyTop: NUMBER, disabled: [true|false]}">
<div> <!-- sticky wrapper, IMPORTANT -->
CONTENT
</div>
</ELEMENT>