Rail
A row of cards that scrolls sideways.
Example
New arrivals
Field notes 101₺91.69
Garden trowel 102₺170.88
Fern 103₺250.07
City atlas 104₺329.26
Hand saw 105₺408.45
Olive tree 106₺487.64
Cookbook 107₺566.83
Tape measure 108₺46.02
Cactus 109₺125.21
Poetry 110₺204.40
Pliers 111₺283.59
Bamboo 112₺362.78
Nothing to show.
Show code
use crate::data::{Product, search_products};
use zeyn::prelude::*;
pub fn overview(_ctx: &Ctx) -> Node {
Rail::of(search_products)
.title("New arrivals")
.card(|p: &Product| Card::image(p.image.clone(), p.name.clone()).text(p.price.to_string()))
.image_size(300, 300)
.into()
}