Interactive previews iPhone

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

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

Platform Compatibility

watchOS 7.0+

Tags

SwiftUI Code

Docs
@State private var currentValue = 0.42

var body: some View {
  VStack {
    Gauge(value: 0.42) {
      Text("Foo")
    }

    Gauge(value: currentValue) {
      Text("Foo")
    } currentValueLabel: {
      Text("\(currentValue)")
    }
    .padding(.vertical)

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

Found an issue or have a suggestion?

Created: June 3, 2025Updated: June 3, 2025

More Gauge Components

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

Gauge Colors

Customizing the colors of different styles with minimal effort

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

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
Hidden Index PageTabViewStyle - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
modifier

Hidden Index PageTabViewStyle

A TabViewStyle that displays a paged scrolling TabView with a hidden index.

EditButton - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
type

EditButton

A button that toggles the edit mode environment value

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.

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

SidebarListStyle

The list style that describes the behavior and appearance of a sidebar list.

Move Disabled - iOS on iPhone - Portrait - Flat Design - Light Mode - Preview
modifier

Move Disabled

Adds a condition for whether the view’s view hierarchy is movable.

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

Menu Section

A Section inside a Menu

Divider Color - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
style

Divider Color

Customizing the color of the Divider

Divider Height - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
style

Divider Height

Customizing the height of the Divider