npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

better-scrollbar

v2.0.2

Published

Highly customizable, high-performance virtual scrollbar component. This package re-exports @better-scrollbar/react for backward compatibility.

Downloads

1,221

Readme

better-scrollbar

NPM Version NPM License Coverage Status

A highly customizable, high-performance virtual scrollbar for rendering large data sets. Ships framework-specific adapters for React and Vue 3, built on a shared framework-agnostic core.

Packages

| Package | Description | Version | | ------------------------------------------- | ------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------- | | @better-scrollbar/core | Framework-neutral algorithms and utilities | npm | | @better-scrollbar/react | React adapter (component, hooks, render props) | npm | | @better-scrollbar/vue | Vue 3 adapter (component, composables) | npm | | better-scrollbar | Compatibility wrapper — re-exports @better-scrollbar/react | npm |

Migrating from v1? The better-scrollbar package continues to export the same React API. No changes are required unless you want to switch to the scoped @better-scrollbar/react import.

Features

  • Children mode for regular lists with familiar JSX / slot syntax.
  • Indexed rendering with itemCount + renderItem / scoped slot for massive data sets (millions of rows).
  • Dynamic height measurement via a shared ResizeObserver with LRU cache.
  • Custom scrollbar tracks, thumbs, and view wrappers through render props (React) or slots (Vue).
  • Scroll anchoring that preserves visible position during prepend and resize.
  • Bottom-following output for log and chat-style views.
  • Sticky rows and group headers with stickyIndices / groupCounts.
  • Native scroll mode that delegates to the browser when possible.
  • Scroll seek placeholders during fast scrolling for expensive row renderers.
  • Adaptive overscan that expands pre-rendering toward the scroll direction.
  • Accessibility with built-in role="list" / role="listitem" and ARIA position metadata.

Quick Start

React

pnpm add @better-scrollbar/react @better-scrollbar/core
import ScrollBar from "@better-scrollbar/react"
import "@better-scrollbar/react/styles/ScrollBar.less"

export default function BasicList() {
	return (
		<ScrollBar width={500} height={300} itemHeight={32}>
			<div key="a">Row A</div>
			<div key="b">Row B</div>
			<div key="c">Row C</div>
		</ScrollBar>
	)
}

Vue 3

pnpm add @better-scrollbar/vue @better-scrollbar/core
<script setup>
import { BScrollBar } from "@better-scrollbar/vue"
import "@better-scrollbar/vue/styles/ScrollBar.less"
</script>

<template>
	<BScrollBar :item-count="10000" :estimated-item-height="32" :height="400">
		<template #default="{ index }">
			<div>Row {{ index }}</div>
		</template>
	</BScrollBar>
</template>

Documentation

Monorepo Structure

better-scrollbar/
├── packages/
│   ├── core/       # @better-scrollbar/core — algorithms, types, utilities
│   ├── react/      # @better-scrollbar/react — React component & hooks
│   └── vue/        # @better-scrollbar/vue — Vue 3 component & composables
├── apps/
│   └── site/       # Documentation site (React)
├── build/          # Compatibility package entry (re-exports @better-scrollbar/react)
└── docs/           # Design docs and detailed API reference

Local Development

This repository uses pnpm workspaces and Turborepo for task orchestration.

corepack enable
pnpm install --frozen-lockfile

| Command | Description | | --------------------- | --------------------------------------- | | pnpm run build | Build all packages via Turborepo | | pnpm run dev | Start dev mode for all packages | | pnpm run typecheck | Type-check all packages | | pnpm run lint | Lint all source files with ESLint | | pnpm run test | Run tests with coverage | | pnpm run clean | Remove all build artifacts | | pnpm run site:dev | Start the documentation site dev server | | pnpm run site:build | Build the documentation site |

Browser Support

Any browser that supports ResizeObserver (Chrome 64+, Firefox 69+, Safari 13.1+, Edge 79+). A polyfill is included as a fallback for older environments.

License

MIT