1.0.4 • Published 2 years ago

v3-scroll v1.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

v3-scroll

v3-scroll is a customizable scroll component created with Vue 3.

Install

$ npm install v3-scroll

Add Plugin

To use the scroll component you shoud import V3Scroll from "v3-scroll" and import v3-scroll/dist/library.mjs.css and use on your App component just like this:

import { createApp } from "vue";
import App from "./App.vue";
import V3Scroll from "v3-scroll";
import "v3-scroll/dist/library.mjs.css";

createApp(App)
  .use(V3Scroll)
  .mount("#app");

Usage

<template>
  <div>
    <V3Scroll />
  </div>
</template>

<script>
    export default {
        name: "App"
    }
</script>

Anatomy Scrollbar

alt text

We can change the size of 1, and the color of 3 and 4. (next updates soon!)

Available Props

PropTypeDefaultDescription
scrollbarWidthString8pxDefines the scrollbar width. The value is expressed in pixels e.g 10px
trackColorString#f1f1f1Defines the track color. The value is expressed in hex or a color name e.g #f2f2f2 or blue
thumbColorString#666Defines the thumb color. The value is expressed in hex or a color name.
thumbHoverColorString#999Defines the thumb hover color. The value is expressed in hex or a color name

Example passing Props

<template>
  <div>
    <V3Scroll scrollbarWidth="12px" thumbColor="blue" />
  </div>
</template>

Browser Compatibility

alt text

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago