Skip to main content
Spacer(props?: { minLength?: number }): Component;

Parameters

props
{ minLength?: number }
Configuration options for the spacer.

Support

Usage

Push content apart

HStack([
    Text("Left"),
    Spacer(),
    Text("Right")
])

Spacer with minimum length

VStack([
    Text("Top"),
    Spacer({ minLength: 20 }),
    Text("Bottom")
])

Multiple spacers for even distribution

HStack([
    Text("1"),
    Spacer(),
    Text("2"),
    Spacer(),
    Text("3")
])