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
PalettePickerStyle - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
style

PalettePickerStyle

A picker style that presents the options as a row of compact elements. When used outside of menus, this style is rendered as a segmented picker. If that is the intended usage, consider segmented instead.

Music Picker - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
modifier

Music Picker

Presents a music picker to select items from the Apple Music catalog and the user’s music library.

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

MenuPickerStyle

A picker style that presents the options as a menu when the user presses a button, or as a submenu when nested within a larger menu.

RenameButton - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
TextField

RenameButton

A button that triggers a standard rename action

Custom Value Label Picker - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
initializer

Custom Value Label Picker

Creates a picker that generates its label from a localized string key and accepts a custom current value label.

CheckboxToggleStyle - macOS - Liquid Glass - Light Mode - Preview
style

CheckboxToggleStyle

A toggle style that displays a checkbox followed by its label.

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

Picker Divider

A Picker with a Divider

Future DatePicker - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
initializer

Future DatePicker

Creates an instance that selects a Date in a closed range