Framework-agnostic scrolling toolkit with custom scrollbars, infinite and virtual scrolling, synchronized views, Web Components, RTL, and accessibility.


Keywords
scrollbar, custom-scrollbar, overlay-scrollbar, scrolling, infinite-scroll, virtual-scroll, scroll-sync, scroll-timeline, pagination, web-component, custom-element, framework-agnostic, dependency-free, accessibility, a11y, rtl, horizontal-scroll, vertical-scroll, typescript, javascript, vanilla-js, angular, react, vue, svelte, ssr
License
MIT
Install
npm install wts-scroll@3.0.1

Documentation

wts-scroll Angular 22 example

An Angular 22 application demonstrating the framework-agnostic wts-scroll package.

The example includes:

  • A vertical activity feed with a custom interaction-aware scrollbar.
  • Typed scroll progress, scroll-end, reach-end, and overflow events.
  • Infinite-style page loading when the feed reaches its end.
  • Programmatic start/end navigation and position save/restore.
  • Runtime track-visibility configuration.
  • A horizontal, wheel-enabled native snap gallery.

Run locally

npm install
npm start

Open http://localhost:4200.

Package integration

Install and register the standards-based custom element:

npm install wts-scroll
import { CUSTOM_ELEMENTS_SCHEMA, Component } from '@angular/core';
import 'wts-scroll/element';

@Component({
  standalone: true,
  schemas: [CUSTOM_ELEMENTS_SCHEMA],
  template: `
    <wts-scroll
      style="display:block;height:24rem"
      direction="vertical"
      reach-end-offset="12%"
      (reach-end)="loadMore()"
    >
      <article>Scrollable Angular content</article>
    </wts-scroll>
  `,
})
export class FeedComponent {
  loadMore(): void {
    // Append the next page of content.
  }
}

The scroll element must have a definite height. It exposes standard DOM events and methods such as scrollToStart(), scrollToEnd(), saveState(), and restoreState().

Verify

npm test -- --watch=false
npm run build