components/virtuallistdynamic
Layout · 49 / 64

VirtualList (Dynamic)

ui.widgets.VirtualList

A virtual list with variable row heights.

BEHAVIOR CONTRACT

Measurement, estimation and scroll anchoring keep variable rows from jumping.

RECORDED INTERACTION

The harness scrolls the variable-height list.

examples/storybook/stories.zig:2974
pub fn buildVirtualListDynamic(scope: *ui.Scope, cx: *ui.Cx) anyerror!*ui.Node {
    const vl = try W.VirtualList(.{
        .item_count = 2000,
        .measure_items = true,
        .estimate_item_height = 44,
        .width = 320,
        .height = 360,
    }).mount(scope, cx, vlDynRender);
    return vl.container;
}
View source on GitHubexamples/storybook/stories.zig:2974

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