Need help with better-scroll?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

ustbhuangyi
13.6K Stars 2.4K Forks MIT License 1.7K Commits 30 Opened issues

Description

:scroll: inspired by iscroll, and it supports more features and has a better scroll perfermance

Services available

!
?

Need anything else?

Contributors list

better-scroll

npm version downloads Build Status Package Quality codecov.io

中文文档

1.x Docs

2.x Docs

2.x Demo

Note:

1.x
is not maintained. please migrate your version as soon as possible

Install

npm install better-scroll -S # install 2.x,with full-featured plugin.

npm install @better-scroll/core # only CoreScroll

import BetterScroll from 'better-scroll'

let bs = new BetterScroll('.wrapper', { movable: true, zoom: true })

import BScroll from '@better-scroll/core'

let bs = new BScroll('.wrapper', {})

CDN

BetterScroll with full-featured plugin.


let wrapper = document.getElementById("wrapper")
let bs = BetterScroll.createBScroll(wrapper, {})

Only CoreScroll


let wrapper = document.getElementById("wrapper")
let bs = new BScroll(wrapper, {})

What is BetterScroll ?

BetterScroll is a plugin which is aimed at solving scrolling circumstances on the mobile side (PC supported already). The core is inspired by the implementation of iscroll, so the APIs of BetterScroll are compatible with iscroll on the whole. What's more, BetterScroll also extends some features and optimizes for performance based on iscroll.

BetterScroll is implemented with plain JavaScript, which means it's dependency free.

Getting started

The most common application scenario of BetterScroll is list scrolling. Let's see its HTML:

  • ...
  • ...
  • ...

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.