Skip to main content
.fixedSize(config: { horizontal?: boolean; vertical?: boolean }): Component;

Parameters

config
{ horizontal?: boolean; vertical?: boolean }
Fixed size configuration.

Support

Usage

Fixed horizontal size

Text("Fixed width text")
    .fixedSize({ horizontal: true })

Fixed vertical size

VStack([
    Text("Line 1"),
    Text("Line 2")
])
.fixedSize({ vertical: true })

Fixed in both dimensions

Image("icon.png")
    .fixedSize({ horizontal: true, vertical: true })