Socket
Socket
Sign inDemoInstall

scroll-view-bar

Package Overview
Dependencies
20
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    scroll-view-bar

Scroll bar with thumbnail background similar to vscode


Version published
Weekly downloads
1
decreased by-50%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

scroll-view-bar

NPM version NPM downloads

Scroll bar with thumbnail background, similar to vscode side navigation

  • Support for listening to the status of the scrollbar being generated
  • Support custom scrollbar styles

Installation

npm install scroll-view-bar --save

Usage

import ScrollViewBar from 'scroll-view-bar';

export default () => (
  <ScrollViewBar style={{height:300}} trigger={'滚动导航'} delay={0}>
    <div>content<div>
  </ScrollViewBar>
);

API

PropertyTypeDefaultDescription
prefixClsStringscroll-view-barprefixCls of this component
triggerReact.ReactNodescroll navigationWhen the mouse hovers over the hover-button, trigger the scroll bar display
delaynumber2000The delay in first loading the background image
observablebooleanfalseWhether to enable content change monitoring for updating the scrollbar background
trackWidthnumber160scroll-track width
trackStyleCSSPropertiesscroll-view-barcustomize track style
thumbStyleCSSPropertiesscroll-view-barcustomize thumb style
onUpdate(value: {top: number;scrollTop: number;scrollHeight: number;clientHeight: number;})=>voidcall when scrolling

Development

# install dependencies
$ npm install

# develop library by docs demo
$ npm start

# build library source code
$ npm run build

# build library source code in watch mode
$ npm run build:watch

# build docs
$ npm run docs:build

# check your project for potential problems
$ npm run doctor

LICENSE

MIT

Keywords

FAQs

Last updated on 22 May 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc