I want to define a layout like this:
How can I let the Buttons grab all the available width, also when the user resizes the Window.
In the upper part three rows of equal width, in the lower part one row with max. width
struct TEST: View { let columns = [ GridItem(.flexible()), GridItem(.flexible()), GridItem(.flexible()) ] let data = ["1 Text ...", "2 longer Text ...", "3 Text ...", "4 Text/FA/Tra ...", "5 Text ...", "6 Text ...", "7 Text ...", "8 Text ...", "9 Text ...", ] var body: some View { VStack (alignment: .leading ){ LazyVGrid(columns: columns) { ForEach(data, id: \.self) { item in Button(action: {print("")}){ Text(item).background(Color.green) } .background(Color.yellow) } } .padding(.horizontal) } Button("even longer Text"){print("x")} Button("even longer Text"){print("x")} Button("even longer Text"){print("x")} } } 

UIScreen.main.bounds.width/heightto get the dimensions of an iPhone. Maybe that works on MacOS, too.