Skip to content

Rail

A row of cards that scrolls sideways.

Example

New arrivals

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()
}