Parameters
Frame configuration object. Can specify exact dimensions or flexible sizing constraints.
Sets the frame dimensions and alignment for this view.
.frame(props: { width?: number; height?: number; alignment?: Alignment }): Component;
.frame(props: { minWidth?: number; idealWidth?: number; maxWidth?: number; minHeight?: number; idealHeight?: number; maxHeight?: number; alignment?: Alignment }): Component;
Show Fixed Frame Properties
Text("Fixed size")
.frame({ width: 200, height: 100 })
Text("Top aligned")
.frame({ width: 300, height: 200, alignment: "top" })
Text("Flexible sizing")
.frame({ minWidth: 100, maxWidth: 300, idealHeight: 50 })