@better-scroll/indicators

used as parallax scrolling, magnifier effects

Usage no npm install needed!

<script type="module">
  import betterScrollIndicators from 'https://cdn.skypack.dev/@better-scroll/indicators';
</script>

README

@better-scroll/indicators

中文文档

Indicator can be used to achieve magnifying glass, parallax scrolling and other effects.

Usage

import BScroll from '@better-scroll/core'
import Indicators from '@better-scroll/indicators'
BScroll.use(Indicators)

const bs = new BScroll('.wrapper', {
  indicators: [
    relationElement: someHTMLElement
  ]
})
interface IndicatorOptions {
  interactive?: boolean
  ratio?: Ratio
  relationElementHandleElementIndex?: number
  relationElement: HTMLElement
}