Components / Spacer

Spacer

Flexible space that pushes its siblings apart.

Example

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

Code

use ravenrs::prelude::*;

fn spacer() -> impl View {
    HStack::new((Text::new("Left"), Spacer::new(), Button::new("Next"))).align(Align::Center)
}

Open in the playground, with every example →

Full API of Spacer →