yew-virtual

Headless list and grid virtualization for Yew, inspired by TanStack Virtual. Ship large scroll surfaces in Rust and WebAssembly with minimal DOM nodes.

CI status Crates.io version MIT License

Interactive example

The Tailwind demo runs vertical and horizontal virtual lists with live stats, gap and padding, and integration-oriented copy you can adapt in your own app.

Open Tailwind example →

Public API

High-level entry points for apps and for headless use without Yew markup.

Symbol Role
Virtualizer Core engine: range math, overscan, scroll alignment, measurements
VirtualizerOptions Item count, size mode, direction, gap, padding, overscan, RTL
use_virtualizer Hook: scroll container ref, passive scroll listener, resize observer
use_window_virtualizer Hook: document / window scroll with the same engine
VirtualizerHandle Read virtual items, total size, scroll helpers, item observers

Features

Installation

Add to your Cargo.toml (crates.io or path as needed):

[dependencies]
yew = { version = "0.21", features = ["csr"] }
yew-virtual = "0.1"

Turn on yew’s csr (or ssr / hydration per Yew’s docs); this crate does not ship separate csr / ssr features.