Components / ScrollEdgeArrow

ScrollEdgeArrow

A strip that scrolls, with an arrow at each end that has more to show.

Example

The component itself, running in WebAssembly, beside its code in a playground. Try it.

Code

use ravenrs::prelude::*;

fn scroll_edge_arrow() -> impl View {
    let photos: Vec<AnyView> = (1..=24)
        .map(|n| -> AnyView {
            Box::new(
                Text::new(format!("Photo {n}"))
                    .style(TextStyle::Callout)
                    .centered()
                    .frame(Some(120.0), Some(72.0))
                    .background(Semantic::Control)
                    .corner_radius(6.0),
            )
        })
        .collect();
    ScrollEdgeArrow::new(photos).fade(Semantic::SurfaceElevated)
}

Open in the playground, with every example →

Full API of ScrollEdgeArrow →