Fusuma

Components / Layout

flipping

view (a container), with its children carried to their new places on a spring when they move.

How it looks

Drawn by the toolkit from the example below. No page of the gallery uses flipping yet, so there is nothing to run.

flipping drawn by Fusuma

view (a container), with its children carried to their new places on a spring when they move.

Children that are added, removed or reordered between two views move to their new places on the spring, instead of jumping (the FLIP technique).

Signature

pub const fn flipping<V>(spring: fusuma_anim::SpringConfig, view: V) -> Flipping<V>

Example

use fusuma::anim::SpringConfig;
use fusuma::{column, flipping, text};
let view = flipping(SpringConfig::SPATIAL, column((text("a"), text("b"))));
let built = fusuma::doc::built::<(), _>(&view);
assert_eq!(built.texts(), ["a", "b"]);

All components · Source