Fusuma

Components / Basics

spacer

A spring.

Try it

This is the Elevation page of the gallery, running in your browser: spacer is on it, and it is the real widget. Press Run, then use it.

Live: Elevation, where spacer is usedOpen full size

Also on this pageelevatedtext

A spring.

It takes the room that is left in a row or a column: put it between two children to push them apart.

Signature

pub const fn spacer() -> Spacer

Example

use fusuma::{button, row, spacer};
let view = row((button("Back"), spacer(), button("Next")));
let built = fusuma::doc::built::<(), _>(&view);
assert_eq!(built.texts(), ["Back", "Next"]);

All components · Source