Materials
All materials
Platform Compatibility
iOS 15.0+ iPadOS 15.0+ macOS 12.0+ watchOS 8.0+ tvOS 15.0+ visionOS 1.0+
Tags
SwiftUI Code
VStack {
HStack {
HStack {
smallRect
.foregroundStyle(.ultraThinMaterial)
smallRect
.foregroundStyle(.thinMaterial)
smallRect
.foregroundStyle(.regularMaterial)
smallRect
.foregroundStyle(.thickMaterial)
smallRect
.foregroundStyle(.ultraThickMaterial)
}
}
.padding()
.background {
meshGradient
}
HStack {
HStack {
smallRect
.foregroundStyle(.ultraThinMaterial)
smallRect
.foregroundStyle(.thinMaterial)
smallRect
.foregroundStyle(.regularMaterial)
smallRect
.foregroundStyle(.thickMaterial)
smallRect
.foregroundStyle(.ultraThickMaterial)
}
}
.padding()
.padding(.horizontal)
.background {
Image(.cats)
.resizable()
.aspectRatio(contentMode: .fill)
.frame(height: 50)
.padding()
.clipped()
}
}
Found an issue or have a suggestion?
Created: May 30, 2025Updated: May 30, 2025