VStack(spacing: 16) {
Text("Divider (fills available width with padding)")
Color.gray.frame(height: 1)
Text("HStack with .frame(maxWidth: 400)")
HStack {
Text("Label")
.foregroundColor(.secondary)
Spacer()
Text("Value")
}
.frame(maxWidth: 400)
.border(.red)
}
.padding()
On iOS, the HStack aligns horizontally with the divider. On Android, the .frame(maxWidth: 400) forces the HStack to ignore the parent bounds.

On iOS, the HStack aligns horizontally with the divider. On Android, the
.frame(maxWidth: 400)forces the HStack to ignore the parent bounds.