Skip to main content

stagger

Function stagger 

Source
pub fn stagger<I, F>(
    delay: f64,
    items: I,
    animate: impl FnMut(<I as IntoIterator>::Item) -> F,
) -> All<VecBranches<Delayed<F>>> ⓘ
where I: IntoIterator, F: Animation,
Expand description

Runs animate on every item, starting each delay seconds after the previous one; completes when all have finished:

ⓘ
stagger(0.15, &cards, |c| c.fade_in()).await;