vlist

Lightweight, high-performance virtual list for the web. Zero dependencies.

v0.3 TypeScript Zero Dependencies MIT ~7 KB core
npm install vlist

Features

⚑
Blazing Fast
DOM recycling, RAF batching, binary search for O(log n) lookups
πŸ“¦
Zero Dependencies
Pure TypeScript. Core weighs ~7 KB, full bundle ~42 KB
πŸ“
Variable Heights
Per-item height function with DOM measurement support
♾️
Infinite Scroll
Async adapter with placeholders, velocity-aware loading
πŸ”€
Reverse Mode
Chat UIs β€” start at bottom, prepend history, auto-scroll
β˜‘οΈ
Selection
Single & multi-select with full keyboard navigation
πŸ”²
Grid Layout
Virtualized 2D grid with configurable columns and gap
πŸ“Œ
Sticky Headers
Grouped lists with sticky section headers (iOS Contacts–style)
πŸ—œοΈ
Compression
Handle millions of items by compressing scroll space

Explore

Quick Start

import { createVList } from "vlist"

const list = createVList({
  container: document.getElementById("list"),
  item: {
    height: 48,
    template: (item) => {
      const el = document.createElement("div")
      el.textContent = item.name
      return el
    }
  },
  items: Array.from({ length: 10_000 }, (_, i) => ({
    id: i,
    name: `Item ${i}`
  }))
})

Sandbox Examples