1.0.1 • Published 7 months ago

svkmedia-vue-lenis v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
7 months ago

Lenis smooth scroll directive for Vue templates

Installation

Install the library

pnpm add vue-lenis

Add 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 in onMounted() hook
  • registerRaf - If you want to run lenis.raf() by yourself, set it to false. (Default: true)
  • settings - Object with lenis instance settings
1.0.1

7 months ago

1.0.0

7 months ago