UNPKG

@kddy/vue-scrollactive

Version:

Lightweight and simple to use vue component that highlights menu items as you scroll the page, also scrolling to target section when clicked.

18 lines (11 loc) 320 B
import Scrollactive from './scrollactive.vue'; export { Scrollactive } const Plugin = {}; Plugin.install = (Vue) => { if (Plugin.install.installed) return; Vue.component('scrollactive', Scrollactive); }; if (typeof window !== 'undefined' && window.Vue) { Plugin.install(window.Vue); } export default Plugin;