iPhone SwiftUI layouts
Explore SwiftUI APIs, components, and modifiers with interactive iPhone previews, Swift code, and Apple documentation. Compare every available orientation, appearance, and design.
201elements
Color
UIKit Content Background colors
The UIKit colors that are also used in other components like in List and GroupBox
Explore UIKit Content Background colors on iPhone in portrait, with SwiftUI code and Apple API documentation.
SwiftUI code
VStack {
List {
Section {
Text("content")
}
}
.frame(maxHeight: 50)
HStack {
smallRect
// can also be used as inverted text color
.foregroundStyle(Color(.systemBackground))
smallRect
// GroupBox content backgroud
.foregroundStyle(Color(.secondarySystemBackground))
smallRect
.foregroundStyle(Color(.tertiarySystemBackground))
smallRect
// can also be used as inverted text color
// List background
.foregroundStyle(Color(.systemGroupedBackground))
smallRect
// List content background
.foregroundStyle(Color(.secondarySystemGroupedBackground))
smallRect
.foregroundStyle(Color(.tertiarySystemGroupedBackground))
}
GroupBox {
Text("content")
}
.frame(maxHeight: 50)
}Compatibility
iOS 13.0.+ iPadOS 13.0+ visionOS 1.0+
Tags
Found an issue or have a suggestion?
All variants
Every available iPhone screenshot for UIKit Content Background colors.