Skip to content

rafalolszewski94/vue3-smooth-scrollbar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

0bd842a · May 12, 2021

History

12 Commits
May 12, 2021
May 11, 2021
May 12, 2021
May 11, 2021
May 12, 2021
May 11, 2021
May 12, 2021
May 12, 2021
May 12, 2021
May 11, 2021
May 11, 2021
May 12, 2021
May 12, 2021

Repository files navigation

vue3-smooth-scrollbar

Test build

Based on vue-smooth-scrollbar

Requirements

  • Vue 3

Installation

NPM

npm install vue3-smooth-scrollbar  #  yarn add vue3-smooth-scrollbar

Usage

Custom main scrollbar

App.vue

<template>
  <scrollbar>
    <!-- content -->
  </scrollbar>
</template>

<script>
import Scrollbar from "vue3-smooth-scrollbar";

export default {
  components: { Navbar, Scrollbar },
};
</script>

Add to your styles

body {
  overflow: hidden;
}

// Assuming you're using default mount element
#app {
  height: 100vh;
  overflow: auto;
}

Development

Project setup

npm run install

Compiles and hot-reloads for development

npm run serve

Compiles and minifies for production

npm run build

Lints and fixes files

npm run lint