Skip to content

iScroll

A small, dependency-free JavaScript scroller for smooth scrolling in web pages.

Stars
12.8k
Forks
3.7k
Licence
MIT
Language
JavaScript
Last update
7.9 years ago
Type
Library

This repository is archived and no longer maintained.

What it is

iScroll is a JavaScript script that replaces a web page's standard scrolling with a custom scroller that can also handle zooming, panning, infinite lists and carousels. The README describes it as small, dependency-free and usable on desktop, mobile and smart TV browsers. Developers add it to a page and point it at a container element.

  • Add smooth scrolling to a list or content area inside a web page
  • Build a simple image carousel
  • Create a zoomable and pannable image or map view
  • Track the scroll position with the probe version

Great for

  • Web developers who need custom scrolling behavior inside a page element
  • Developers building mobile web pages that need smooth scrolling on older devices
  • Projects that need to read or set scroll coordinates during momentum scrolling
  • Developers working with very long lists who can use the infinite scrolling version

Not ideal for

  • Projects that only need normal browser scrolling, since the README notes native scrolling is often good enough
  • Teams that need active maintenance, because the repository is archived and the last push was in December 2018
  • Developers who need to use the scroller in new code without checking browser compatibility first

How to get it

  1. 1

    See the README

    Clone the repository

    git clone https://github.com/cubiq/iscroll
  2. 2

    Run it

    • Download or clone the repository and find the iscroll.js file
    • Add a script tag for iscroll.js to your HTML page
    • Create a wrapper element around the content you want to scroll
    • Call new IScroll('#wrapper') once the page has loaded
  3. 3

    Get the most out of it

    • Use the demos folder in the repository to see most features in action
    • Set position:relative or absolute on the wrapper element to fix wrong size calculations
    • Use iscroll-lite.js if you only need basic scrolling on mobile
    • Pass options such as mouseWheel or scrollbars when creating the instance
    • Simplify your CSS shadows and opacity effects if scrolling feels slow

Downloads

Strengths

  • The README describes it as small (about 4kb) and dependency-free
  • It offers several focused versions, such as lite, probe, zoom and infinite
  • It exposes scroll position and a range of custom events and easing functions

Trade-offs

  • The repository is archived, so it is no longer maintained and the README may not reflect current browser behavior
  • The README warns that some CSS properties such as box-shadow and opacity can cause lag with hardware acceleration

How it compares

ProjectStarsTypeLevelUpdatedBest for
iscroll (this)12.8kLibraryintermediate7.9 years agoWeb developers who need custom scrolling behavior inside a page element
swiper41.9kLibraryintermediate6 days agoFront-end developers adding a swipeable slider or image gallery to a website
better-scroll16.4kLibraryintermediate2.4 years agoFront-end developers building mobile web lists or scrollable panels

Stats synced from GitHub. The assessment above was drafted with AI from the project's README on 2026-10-29 and may miss recent changes — check the README before relying on a command. MIT licence: free to use, modify and distribute, including commercially, as long as you keep the copyright notice.