RavenRS · Rust GUI

VirtualList

Edit and run the VirtualList RavenRS example in your browser. Explore its Rust code and download a Cargo project for desktop and WebAssembly.

One declarative Rust interface, GPU rendering, reactive state and semantic design tokens. Free and open source under MIT OR Apache-2.0.

Rust source

fn virtual_list() -> impl View {
    // Ten thousand rows of different heights: only what shows exists.
    let selected = State::new(None::<usize>);
    VirtualList::new(10_000, |index| {
        let tall = 1 + index % 3;
        let words = vec!["A row that says how tall it is"; tall].join("\n");
        VStack::new((Text::new(format!("Row {index}")), Text::new(words))).padding(8.0)
    })
    .key(|index| index as u64)
    .selection(selected.binding())
    .height(260.0)
}

The interactive preview loads when JavaScript and WebGPU or WebGL2 are available. You can read the guide and examples here at any time.

More examples