RavenRS · Rust GUI

CardView

Edit and run the CardView 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 card_view() -> impl View {
    let selected = State::new(std::collections::BTreeSet::from([1]));
    CardView::new(10_000, |i| -> AnyView {
        Box::new(
            VStack::new((
                Text::new(format!("Customer {i}")).font_weight(Weight::SEMIBOLD),
                Text::new(format!("R$ {},00", 100 + i * 7)).foreground(Semantic::InkMuted),
            ))
            .spacing(4.0),
        )
    })
    .card_name(|i| format!("Customer {i}"))
    .card_width(180.0)
    .card_height(84.0)
    .selection(selected.binding())
    .height(300.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