Skip to content

AutoGrid

As many columns as fit the width.

Example

Orders

Stock

People

Invoices

Reports

Settings

Show code
use zeyn::prelude::*;

pub fn overview(_ctx: &Ctx) -> Node {
    ["Orders", "Stock", "People", "Invoices", "Reports", "Settings"]
        .into_iter()
        .fold(AutoGrid::new().min(160), |tiles, title| tiles.add(Card::new().title(title)))
        .into()
}