Interactive previews iPhone
UIKit Separator Colors
The UIKit separator colors that are also used in other components, such as the TextField
Platform Compatibility
iOS 13.0+ iPadOS 13.0+ tvOS 13.0+ visionOS 1.0+
Tags
SwiftUI Code
VStack {
Divider()
HStack {
smallRect
// Divider color
.foregroundStyle(Color(.separator))
smallRect
.foregroundStyle(Color(.opaqueSeparator))
smallRect
// Divider color
.foregroundStyle(Color(.separator))
.background(.orange)
smallRect
.foregroundStyle(Color(.opaqueSeparator))
.background(.orange)
}
}Found an issue or have a suggestion?
Created: May 29, 2025Updated: May 29, 2025
More Color Components
View allUIKit Content Background colors
The UIKit colors that are also used in other components like in List and GroupBox
UIKit Text Colors
The UIKit text colors that are also used in other components, such as the TextField
Color Variants
HierarchicalShapeStyle, a shape style that maps to one of the numbered content styles
Explore Other Components
Browse allAccessoryLinearCapacityGaugeStyle
A gauge style that displays bar that fills from leading to trailing edges as the gauge’s current value increases
Section Index Label and Visibility
Sets the label that is used in a section index to point to this section, typically only a single character long. Changes the visibility of the list section index.
Stepped Slider
Creates a slider to select a value from a given range, subject to a step increment