Interactive previews iPhone

Gauge Colors

Customizing the colors of different styles with minimal effort

Gauge Colors - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview

Platform Compatibility

iOS 16.0+ iPadOS 16.0+ macOS 13.0+ watchOS 7.0+ visionOS 1.0+

Tags

SwiftUI Code

Docs
@State private var currentValue = 0.42

var body: some View {
    VStack {
        HStack {
            Gauge(value: currentValue) {
                Text("Foo")
            } currentValueLabel: {
                Text("42")
                    .foregroundColor(.indigo)
            } minimumValueLabel: {
                Text("0")
                    .foregroundColor(.mint)
            } maximumValueLabel: {
                Text("100")
                    .foregroundColor(.blue)
            }
            .gaugeStyle(.accessoryCircular)

            Gauge(value: currentValue) {
                Text("Foo")
            } currentValueLabel: {
                Text("42")
            } minimumValueLabel: {
                Text("0")
            } maximumValueLabel: {
                Text("100")
            }
            .gaugeStyle(.accessoryCircularCapacity)
        }
        Gauge(value: currentValue) {
            Text("Foo")
        } currentValueLabel: {
            Text("42")
        } minimumValueLabel: {
            Text("0")
        } maximumValueLabel: {
            Text("100")
        }
        .gaugeStyle(.linearCapacity)
        Gauge(value: currentValue) {
            Text("Foo")
        } currentValueLabel: {
            Text("42")
        } minimumValueLabel: {
            Text("0")
        } maximumValueLabel: {
            Text("100")
        }
        .gaugeStyle(.accessoryLinear)

        Gauge(value: currentValue) {
            Text("Foo")
        } currentValueLabel: {
            Text("42")
        } minimumValueLabel: {
            Text("0")
        } maximumValueLabel: {
            Text("100")
        }
        .gaugeStyle(.accessoryLinearCapacity)
    }
    .tint(Gradient(colors: [.green, .orange, .red]))
        .foregroundStyle(.brown)
}

Found an issue or have a suggestion?

Created: June 3, 2025Updated: December 27, 2025

More Gauge Components

View all
CircularGaugeStyle - iOS on iPhone - Portrait - Flat Design - Light Mode - Preview
style

CircularGaugeStyle

A gauge style that displays an open ring with a marker that appears at a point along the ring to indicate the gauge’s current value

 LinearGaugeStyle - iOS on iPhone - Portrait - Flat Design - Light Mode - Preview
style

LinearGaugeStyle

A gauge style that displays a bar with a marker that appears at a point along the bar to indicate the gauge’s current value

AccessoryLinearCapacityGaugeStyle - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
style

AccessoryLinearCapacityGaugeStyle

A gauge style that displays bar that fills from leading to trailing edges as the gauge’s current value increases

AccessoryLinearGaugeStyle - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
style

AccessoryLinearGaugeStyle

A gauge style that displays bar with a marker that appears at a point along the bar to indicate the gauge’s current value

LinearCapacityGaugeStyle - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
style

LinearCapacityGaugeStyle

A gauge style that displays a bar that fills from leading to trailing edges as the gauge’s current value increases

AccessoryCircularCapacityGaugeStyle - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
style

AccessoryCircularCapacityGaugeStyle

A gauge style that displays a closed ring that’s partially filled in to indicate the gauge’s current value

AccessoryCircularGaugeStyle - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
style

AccessoryCircularGaugeStyle

A gauge style that displays an open ring with a marker that appears at a point along the ring to indicate the gauge’s current value

Min Max Current Value Gauge - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
initializer

Min Max Current Value Gauge

Creates a gauge showing a value within a range and describes the gauge’s current, minimum, and maximum values

Explore Other Components

Browse all
List Section Separator Tint - iOS on iPhone - Portrait - Flat Design - Light Mode - Preview
modifier

List Section Separator Tint

Sets the tint color associated with a section.

Label Icon To Title Spacing - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
modifier

Label Icon To Title Spacing

Set the spacing between the icon and title in labels.

List Badge - iOS on iPhone - Portrait - Flat Design - Light Mode - Preview
modifier

List Badge

Generates a badge for the view from an integer value.

Menu Divider - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
content

Menu Divider

A Menu with a Divider

Outline Group - iOS on iPhone - Portrait - Flat Design - Light Mode - Preview
initializer

Outline Group

A structure that computes views and disclosure groups on demand from an underlying collection of tree-structured, identified data.

GroupBox Background - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
modifier

GroupBox Background

Set a custom GroupBox background

Section Index Label and Visibility - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
modifier

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.

InsetGroupedListStyle - iOS on iPhone - Portrait - Flat Design - Light Mode - Preview
style

InsetGroupedListStyle

The list style that describes the behavior and appearance of an inset grouped list.