components/virtuallist
Layout · 48 / 64

VirtualList

ui.widgets.VirtualList

Mounts only the visible window of large uniform lists.

BEHAVIOR CONTRACT

item_count, item_height, overscan, reuse and scroll offset give a stable O(visible) cost.

RECORDED INTERACTION

The harness scrolls; nodes only cover the visible range.

examples/storybook/stories.zig:2944
pub fn buildVirtualList(scope: *ui.Scope, cx: *ui.Cx) anyerror!*ui.Node {
    const vl = try W.VirtualList(.{ .item_count = 1000, .item_height = 28, .width = 320, .height = 360 }).mount(scope, cx, vlRender);
    return vl.container;
}
View source on GitHubexamples/storybook/stories.zig:2944

The story's verbatim source from the Storybook (zenit 4c50245 2026-10-01). W is ui.widgets; col / row / label are small Storybook layout helpers.

zenit · Dual-licensedFree for open-source projects under GPL-3.0-only; closed-source or commercial products need a commercial license.Contact the author: zongyi.xzy#gmail.com (replace # with @)zenit 4c50245 2026-10-01