Skip to content

dbzx10299/vue-remove-scroll

Repository files navigation

Vue Remove Scroll

Install

npm i vue-remove-scroll

Usage

Disable scroll

import { useRemoveScroll } from 'vue-remove-scroll'

const { enableScroll, disableScroll } = useRemoveScroll()

Allow scrolling on a certain element

import { useRemoveScroll } from 'vue-remove-scroll'
import { ref } from 'vue'

const modal = ref(null)

const { enableScroll, disableScroll } = useRemoveScroll({
  excludedElements: [modal.value]
})

Credits

This project is based on and contains code from:

Licenses

This project is licensed under the MIT License.

About

Remove scroll outside of a child node

Resources

License

Stars

Watchers

Forks

Packages

No packages published