# jctk-page-preview-scrollbar

> A scrollbar with current page preview for Vue2.

Latest version **0.2.5** (published 2021-11-10) · 0 weekly downloads

## Install

```sh
npm install jctk-page-preview-scrollbar
pnpm add jctk-page-preview-scrollbar
yarn add jctk-page-preview-scrollbar
bun add jctk-page-preview-scrollbar
```

## Health

**Score 10/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; low quality score; large bundle; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.5 |
| Published | 2021-11-10 |
| First published | 2020-12-28 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 10.8 MB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 5 |
| Maintainers | jchou24 |

## Links

- npm: https://www.npmjs.com/package/jctk-page-preview-scrollbar
- Repository: https://github.com/Jchou24/page-preview-scrollbar
- Homepage: https://github.com/Jchou24/page-preview-scrollbar#readme
- Issues: https://github.com/Jchou24/page-preview-scrollbar/issues
- npm.io page: https://npm.io/package/jctk-page-preview-scrollbar

## Dependencies (3)

- [vue](https://npm.io/package/vue.md) ^2.6.11
- [vuex](https://npm.io/package/vuex.md) ^3.6.0
- [core-js](https://npm.io/package/core-js.md) ^3.6.5

## Recent versions

- 0.2.5 (latest) — 2021-11-10
- 0.2.4 — 2021-11-10
- 0.2.3 — 2021-11-09
- 0.2.2 — 2021-11-09
- 0.2.1 — 2021-11-09
- 0.2.0 — 2021-11-09
- 0.1.4 — 2020-12-30
- 0.1.3 — 2020-12-28
- 0.1.2 — 2020-12-28
- 0.1.1 — 2020-12-28

## README

# [Page Preview Scrollbar](https://github.com/Jchou24/page-preview-scrollbar)

A scrollbar with current page preview for Vue2.

[Demo](https://jchou24.github.io/Demos/PagePreviewScrollbar/index.html)

[Demo Video](https://jchou24.github.io/Demos/PagePreviewScrollbar/Demo(2021-01-01).mp4)

![img](./screen_shot.png)

# Installation

```bash
npm install -D jctk-page-preview-scrollbar
npm install @vue/composition-api
``` 

# Usage

```js
// main.js
import 'jctk-page-preview-scrollbar'
import 'jctk-page-preview-scrollbar/dist/jctk-page-preview-scrollbar.css'
import VueCompositionAPI from '@vue/composition-api'

Vue.use(VueCompositionAPI)
```

In your component.
```html
<template>
    <PagePreviewScrollbar />
</template>
```

## Why Composition API

Since some mechanism of vue & composition API.

The library deveoped with composition API seems can not run individually without it.

The detail is descriped [here](https://stackoverflow.com/questions/64864935/runtime-error-integrating-a-component-lib-that-uses-vue-composition-api-you-m).

# Configurations

Property | Type | Default | Description
--- | --- | --- | ---
isHideShorterHeight | Boolean | true | Automatically hide the scrollbar when screen is short.
isShowCloseButton | Boolean | true | Display the buton which can close scrollbar.
isAutoOpacity | Boolean | true | Make the scrollbar transparent.
persist | Boolean | true | Force the scrollbar always appeared/disappeared.
repaintAnimation | Boolean | true | Add transition animation when repaint.
isResizeAutoRepaint | Boolean | false | Auto repain when sceen height or width resizes.
disableRepaint | Boolean | false | Set true to avoid performance decreased by repainting.
zIndex | Number | 100 | css z-index.
targetSelector | String | "html" | The element used to preview.
elementToRmoveSelectors | Array<String> | [] | The elements should not appear in scrollbar.
throttle | Number | 25 |
debounceRepaint | Number | 1000 |

# Events

Event | Description
--- | ---
@repainted | Triggered when scrollbar repainted the preview.
@active    | Triggered when scrollbar is active.
@inactive  | Triggered when scrollbar is inactive.

# Methods

Method | Description
--- | ---
Reset | Force the scrollbar repaint the preview.
ResetScroller | Force the scrollbar reset the screen position.

---
_Source: https://npm.io/package/jctk-page-preview-scrollbar · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
