Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@humandetail/scroller

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@humandetail/scroller

A plugin that adds custom scrollbars to the DOM

  • 0.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Scroller

📦 Install

Install with npm:

npm i @humandetail/scroller

Install with yarn:

yarn add @humandetail/scroller

🦄 Usage

import Scroller from '@humandetail/scroller'

const scroller = new Scroller('.content', {
  height: '500px'
})

📖 Params

参数类型初始值说明
wheelStepnumber20应用于每个鼠标滚轮步骤的滚动量
widthstringauto容器的宽度
heightstring100vh容器的高度
scrollbarWidthnumber10滚动条的宽度
buttonSizenumber10滚动条按钮的尺寸
trackWidthnumber10滚动条轨道的宽度
thumbWidthnumber10滚动条滑块的宽度
resizebooleantrue是否监听窗口的 resize 事件
observebooleantrue是否监听 DOM 变化
reachOffsetobject{ top: number; right: number; bottom: number; left: number; }触底/触顶偏移量
buttonbooleantrue是否需要上下按钮
stylesobject{ bar?: Partial<CSSStyleDeclaration>; button?: Partial<CSSStyleDeclaration>; track?: Partial<CSSStyleDeclaration>; thumb?: Partial<CSSStyleDeclaration>; }滚动条样式

📄 License

MIT License © 2019-PRESENT Humandetail

Keywords

FAQs

Package last updated on 03 Sep 2022

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc