1.0.0 • Published 2 years ago
vue-lenis v1.0.0
✋ Lenis smooth scroll directive for Vue templates
Installation
Install the library
pnpm add vue-lenisAdd the plugin to your Vue app:
import lenis from "vue-lenis";
createApp(App)
.use(lenis)
.mount("#app");Usage
Just specify v-lenis directive on a scrollable element and it's done!
<template lang="pug">
.view(v-lenis)
.content
// ...
</template>Optionally you can provide an object with fields for the value:
ref- Vue ref which will be assigned a lenis instance, available inonMounted()hookregisterRaf- If you want to run lenis.raf() by yourself, set it tofalse. (Default:true)settings- Object with lenis instance settings
1.0.0
2 years ago