vue-sticky-top
v0.0.3
Published
Sticky element
Downloads
2
Readme
VueSticky
Sticky element
for useage with Vue 1.x, see the 2.x branch
Installation
npm install --save vue-sticky
Usage
Bundler (Webpack, Rollup)
import Vue from 'vue'
import VueSticky from 'vue-sticky'
Vue.use(VueSticky)
Browser
<!-- Include after Vue -->
<!-- Local files -->
<link rel="stylesheet"
<script src="vue-sticky/dist/vue-sticky.js"></script>
<!-- From CDN -->
<script src="https://unpkg.com/vue-sticky"></script>
Example
<nav v-sticky>
content
</nav>
or
<nav v-sticky="{ top: 15, zIndex: 0 }">
content
</nav>
Options
| Name | Default | Description |
| ---- | ------ | ----- |
| top | 0
| Top position |
| zIndex | 1000
| Index |