RavenRS · Rust GUI

TileLayout

Edit and run the TileLayout 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 tile_layout() -> impl View {
    let spots = State::new(vec![TileSpot::new("sales", 2, 1)]);
    TileLayout::new(spots.binding())
        .columns(3)
        .row_height(110.0)
        .tile(Tile::new("sales", "Sales", Stat::new("This month", "R$ 48,200")))
        .tile(
            Tile::new("bills", "Bills", Stat::new("Open", "12"))
                .accessory(Badge::new("3 late").tone(Tone::Danger)),
        )
        .tile(Tile::new("stock", "Stock", Stat::new("Items", "1,204")))
        .tile(Tile::new("people", "People", Stat::new("Active", "37")))
}

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