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:
| Prop | Type | Default | Description |
|---|---|---|---|
| items | readonly T[] | required | Records. |
| getKey / renderItem | callbacks | required | Stable key and row content. |
| rowHeight / height / overscan | number | 48 / 320 / 3 | Window 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-listMake 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.
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.