More Premium Hugo Themes Premium React Themes

Virtua

A zero-config, fast and small (~3kB) virtual list (and grid) component for React, Vue, Solid and Svelte.

Virtua

A zero-config, fast and small (~3kB) virtual list (and grid) component for React, Vue, Solid and Svelte.

Author Avatar Theme by inokawa
Github Stars Github Stars: 2786
Last Commit Last Commit: May 16, 2025 -
First Commit Created: Jun 1, 2024 -
default image

Overview:

The virtualnpm library is a zero-config, fast, and small virtual list (and grid) component designed for React, Vue, Solid, and Svelte frameworks. It aims to provide the best performance without requiring extensive configuration while handling common challenges associated with virtualization like dynamic size measurement, scroll position adjustments, imperatives scrolling, and iOS support. With bundle sizes around 3kB gzipped per component and support for various use cases, including fixed size, dynamic size, reverse scrolling, RTL, infinite scrolling, and more, virtualnpm targets modern web development needs.

Features:

  • Zero-config virtualization: Provides optimal performance without the need for extensive configuration.
  • Fast: Optimizes scrolling performance by reducing CPU usage, layout recalculations, and visual jumps on repaint.
  • Small bundle size: Components are around 3kB gzipped and tree-shakeable, with a total size of approximately 5kB gzipped for React.
  • Flexible: Supports multiple use cases such as fixed size, dynamic size, horizontal scrolling, reverse scrolling, mobile, infinite scrolling, and more.
  • Framework agnostic: Compatible with React, Vue, Solid, and Svelte, with the possibility of expanding to other frameworks.

Installation:

To install virtualnpm, ensure you have the required versions of the frameworks:

React:

react >= 16.14
// If using ESM and webpack 5, use react >= 18 to avoid issues.

Vue:

vue >= 3.2

Solid:

solid-js >= 1.0

Svelte:

svelte >= 4.0

For legacy browser support without ResizeObserver, consider using a polyfill. Detailed documentation, API references, and examples can be found on the virtualnpm GitHub page.

Summary:

The virtualnpm library offers a lightweight, high-performance solution for virtual lists and grids across multiple frameworks. With its focus on ease of use, speed, small bundle sizes, and flexibility in handling various virtualization scenarios, virtualnpm is a valuable tool for modern web development projects.