v0.3.1 StableFoundation ComponentReact 18 & 19Zero Runtime CSS

VirtualList

Window fixed-height rows with an explicit full-list alternative.

Interactive preview

Usage

import { VirtualList } from "@devvy-ui/react";

<VirtualList label="Project records" items={records} getKey={row => row.id} renderItem={row => row.name} />

API reference

Native HTML attributes, className, style and a forwarded ref are supported. Component-specific props:

PropTypeDefaultDescription
itemsreadonly T[]requiredRecords.
getKey / renderItemcallbacksrequiredStable key and row content.
rowHeight / height / overscannumber48 / 320 / 3Window measurements.

Accessibility & behavior

Platform Behavior & Guidelines

Uses native scrolling, setsize/posinset and overscan. A focused row is retained while other windows move. Show all items provides a nonvirtual alternative. Row height is fixed; huge content needs its own layout policy.

Source ownership

Run npx @devvy-ui/cli init once in your React project, then add the source:

npx @devvy-ui/cli add virtual-list

Make the source yours.

Start from the canonical implementation used by the package and registry. Change the code, keep the MIT notice, and build the behavior your project needs.

VirtualList.tsxREACT / TSX

Edit your own copy. Downloaded source uses your changes; the component preview above uses the shipped version. Run the source installer first to include shared helpers.