---
title: "LinearGaugeStyle | Explore SwiftUI"
description: "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"
canonical_url: "https://exploreswiftui.com/library/gauge/lineargaugestyle"
meta:
  author: "Explore SwiftUI"
  "og:description": "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"
  "og:image": "https://exploreswiftui.com/_og/d/c_Component%2Ctitle_%2BLinearGaugeStyle%2Cdescription_~QSBnYXVnZSBzdHlsZSB0aGF0IGRpc3BsYXlzIGEgYmFyIHdpdGggYSBtYXJrZXIgdGhhdCBhcHBlYXJzIGF0IGEgcG9pbnQgYWxvbmcgdGhlIGJhciB0byBpbmRpY2F0ZSB0aGUgZ2F1Z2XigJlzIGN1cnJlbnQgdmFsdWU%2Ccategory_Gauge%2Cimage_~L2FwaS9pbWFnZXMvNDYvdmFyaWFudHMvMjY0P3Y9MTc5MDA3MzQ3ODg0MiZyPTImdz0xMjgwJnE9ODUmZj1qcGVn%2CimageMode_crop%2CimagePosition_center%2CimageFrame_~cG9zaXRpb246IGFic29sdXRlOyByaWdodDogMDsgd2lkdGg6IDY0MHB4OyBoZWlnaHQ6IDQ4MHB4OyBkaXNwbGF5OiBmbGV4OyBvdmVyZmxvdzogaGlkZGVuOyBiYWNrZ3JvdW5kOiAjRkZGRkZGOyBib3gtc2hhZG93OiAwIC0xMHB4IDUwcHggcmdiYSgzNyw5OSwyMzUsMC4xOCk7IGJvcmRlci1sZWZ0OiAxcHggc29saWQgcmdiYSgwLDAsMCwwLjA2KTsgdG9wOiA3NXB4OyBib3JkZXItdG9wOiAxcHggc29saWQgcmdiYSgwLDAsMCwwLjA2KTsgYm9yZGVyLWJvdHRvbTogMXB4IHNvbGlkIHJnYmEoMCwwLDAsMC4wNik7IGJvcmRlci10b3AtbGVmdC1yYWRpdXM6IDMycHg7IGJvcmRlci1ib3R0b20tbGVmdC1yYWRpdXM6IDMycHg7%2Cprops_eyJwbGF0Zm9ybXMiOlsid2F0Y2hPUyJdfQ%2Cp_Ii9saWJyYXJ5L2dhdWdlL2xpbmVhcmdhdWdlc3R5bGUi%2Cs_virn9yUxKb84Sxqv.png"
  "og:image:height": "630"
  "og:image:type": image/png
  "og:image:width": "1200"
  "og:title": "LinearGaugeStyle | Explore SwiftUI"
  "twitter:description": "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"
  "twitter:image": "https://exploreswiftui.com/_og/d/c_Component%2Ctitle_%2BLinearGaugeStyle%2Cdescription_~QSBnYXVnZSBzdHlsZSB0aGF0IGRpc3BsYXlzIGEgYmFyIHdpdGggYSBtYXJrZXIgdGhhdCBhcHBlYXJzIGF0IGEgcG9pbnQgYWxvbmcgdGhlIGJhciB0byBpbmRpY2F0ZSB0aGUgZ2F1Z2XigJlzIGN1cnJlbnQgdmFsdWU%2Ccategory_Gauge%2Cimage_~L2FwaS9pbWFnZXMvNDYvdmFyaWFudHMvMjY0P3Y9MTc5MDA3MzQ3ODg0MiZyPTImdz0xMjgwJnE9ODUmZj1qcGVn%2CimageMode_crop%2CimagePosition_center%2CimageFrame_~cG9zaXRpb246IGFic29sdXRlOyByaWdodDogMDsgd2lkdGg6IDY0MHB4OyBoZWlnaHQ6IDQ4MHB4OyBkaXNwbGF5OiBmbGV4OyBvdmVyZmxvdzogaGlkZGVuOyBiYWNrZ3JvdW5kOiAjRkZGRkZGOyBib3gtc2hhZG93OiAwIC0xMHB4IDUwcHggcmdiYSgzNyw5OSwyMzUsMC4xOCk7IGJvcmRlci1sZWZ0OiAxcHggc29saWQgcmdiYSgwLDAsMCwwLjA2KTsgdG9wOiA3NXB4OyBib3JkZXItdG9wOiAxcHggc29saWQgcmdiYSgwLDAsMCwwLjA2KTsgYm9yZGVyLWJvdHRvbTogMXB4IHNvbGlkIHJnYmEoMCwwLDAsMC4wNik7IGJvcmRlci10b3AtbGVmdC1yYWRpdXM6IDMycHg7IGJvcmRlci1ib3R0b20tbGVmdC1yYWRpdXM6IDMycHg7%2Cprops_eyJwbGF0Zm9ybXMiOlsid2F0Y2hPUyJdfQ%2Cp_Ii9saWJyYXJ5L2dhdWdlL2xpbmVhcmdhdWdlc3R5bGUi%2Cs_virn9yUxKb84Sxqv.png"
  "twitter:title": "LinearGaugeStyle | Explore SwiftUI"
---

> Index of every page on this site: [llms.txt](https://exploreswiftui.com/llms.txt)

**Interactive previews**[ iPhone](https://exploreswiftui.com/iphone?element=46)

# **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](https://exploreswiftui.com/api/images/46/variants/264?v=1790073478842&r=2&w=800&q=80&f=webp)

### **Platform Compatibility**

watchOS 7.0+

### **Tags**

### **SwiftUI Code**

[ Docs](https://developer.apple.com/documentation/swiftui/gaugestyle/linear)

```
@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 **](https://exploreswiftui.com/library/gauge)

![Gauge Colors - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview](https://exploreswiftui.com/api/images/48/variants/261?v=1790073478842&r=2&w=412&q=75&f=webp)

### **Gauge Colors**

Customizing the colors of different styles with minimal effort

![CircularGaugeStyle - iOS on iPhone - Portrait - Flat Design - Light Mode - Preview](https://exploreswiftui.com/api/images/47/variants/263?v=1790073478842&r=2&w=412&q=75&f=webp)

### **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](https://exploreswiftui.com/api/images/45/variants/257?v=1790073478842&r=2&w=412&q=75&f=webp)

### **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](https://exploreswiftui.com/api/images/44/variants/253?v=1790073478842&r=2&w=412&q=75&f=webp)

### **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](https://exploreswiftui.com/api/images/43/variants/267?v=1790073478842&r=2&w=412&q=75&f=webp)

### **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](https://exploreswiftui.com/api/images/42/variants/412?v=1790073478842&r=2&w=412&q=75&f=webp)

### **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](https://exploreswiftui.com/api/images/41/variants/219?v=1790073478842&r=2&w=412&q=75&f=webp)

### **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](https://exploreswiftui.com/api/images/40/variants/231?v=1790073478842&r=2&w=412&q=75&f=webp)

### **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 **](https://exploreswiftui.com/)

![Outline Group - iOS on iPhone - Portrait - Flat Design - Light Mode - Preview](https://exploreswiftui.com/api/images/132/variants/371?v=1790073478842&r=2&w=412&q=75&f=webp)

### **Outline Group**

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

![Custom Labeled Content - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview](https://exploreswiftui.com/api/images/152/variants/494?v=1790073478842&r=2&w=412&q=75&f=webp)

### **Custom Labeled Content**

Creates a standard labeled element, with a view that conveys the value of the element and a label.

![Materials - iOS on iPhone - Portrait - Flat Design - Light Mode - Preview](https://exploreswiftui.com/api/images/26/variants/169?v=1790073478842&r=2&w=412&q=75&f=webp)

### **Materials**

All materials

![Text Format - iOS on iPhone - Portrait - Flat Design - Light Mode - Preview](https://exploreswiftui.com/api/images/99/variants/307?v=1790073478842&r=2&w=412&q=75&f=webp)

### **Text Format**

Creates a text view that displays the formatted representation of a nonstring type supported by a corresponding format style.

![ControlSize - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview](https://exploreswiftui.com/api/images/97/variants/303?v=1790073478842&r=2&w=412&q=75&f=webp)

### **ControlSize**

A control version that is the default size

![Toolbar Item Visibility Priority - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview](https://exploreswiftui.com/api/images/238/variants/733?v=1792389091475&r=2&w=412&q=75&f=webp)

### **Toolbar Item Visibility Priority**

Defines the visibility priority for a toolbar item.

![NavigationControlGroupStyle - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview](https://exploreswiftui.com/api/images/56/variants/404?v=1790073478842&r=2&w=412&q=75&f=webp)

### **NavigationControlGroupStyle**

The navigation control group style

![Tab View Side Bar Header - iPadOS - Landscape - Liquid Glass - Light Mode - Preview](https://exploreswiftui.com/api/images/167/variants/729?v=1790073478842&r=2&w=412&q=75&f=webp)

### **Tab View Side Bar Header**

Adds a custom header to the sidebar of a tab view.

```json
{"@context":"https://schema.org","@graph":[{"@id":"https://exploreswiftui.com/#website","@type":"WebSite","description":"A visual library for SwiftUI APIs, components, and modifiers","inLanguage":"en-US","name":"Explore SwiftUI","url":"https://exploreswiftui.com/","publisher":{"@id":"https://exploreswiftui.com/#identity"}},{"@id":"https://exploreswiftui.com/library/gauge/lineargaugestyle#webpage","@type":"WebPage","dateModified":"2025-06-03T19:59:44.187Z","datePublished":"2025-06-03T19:29:42.445Z","description":"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","name":"LinearGaugeStyle","url":"https://exploreswiftui.com/library/gauge/lineargaugestyle","breadcrumb":{"@id":"https://exploreswiftui.com/library/gauge/lineargaugestyle#breadcrumb"},"isPartOf":{"@id":"https://exploreswiftui.com/#website"},"mainEntity":{"@id":"https://exploreswiftui.com/library/gauge/lineargaugestyle#article"},"potentialAction":[{"@type":"ReadAction","target":["https://exploreswiftui.com/library/gauge/lineargaugestyle"]}],"primaryImageOfPage":{"@id":"https://exploreswiftui.com/#logo"}},{"@id":"https://exploreswiftui.com/#identity","@type":"Organization","description":"A visual library for SwiftUI APIs, components, and modifiers","name":"Explore SwiftUI","url":"https://exploreswiftui.com","logo":{"@id":"https://exploreswiftui.com/#logo"},"sameAs":["https://x.com/Typ0genius","https://mastodon.social/@Typ0genius"]},{"@id":"https://exploreswiftui.com/library/gauge/lineargaugestyle#article","citation":"https://developer.apple.com/documentation/swiftui/gaugestyle/linear","dateModified":"2025-06-03T19:59:44.187Z","datePublished":"2025-06-03T19:29:42.445Z","description":"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","headline":"LinearGaugeStyle","inLanguage":"en-US","name":"LinearGaugeStyle","thumbnailUrl":"https://exploreswiftui.com/api/images/46/variants/264?v=1790073478842&r=2","url":"https://exploreswiftui.com/library/gauge/lineargaugestyle","@type":["Article","TechArticle"],"about":{"@type":"Thing","name":"SwiftUI"},"author":{"@id":"https://exploreswiftui.com/#identity"},"hasPart":{"@id":"https://exploreswiftui.com/library/gauge/lineargaugestyle#source-code"},"image":{"@id":"https://exploreswiftui.com/#/schema/image/1"},"isPartOf":{"@id":"https://exploreswiftui.com/library/gauge/lineargaugestyle#webpage"},"mainEntityOfPage":{"@id":"https://exploreswiftui.com/library/gauge/lineargaugestyle#webpage"},"publisher":{"@id":"https://exploreswiftui.com/#identity"}},{"@id":"https://exploreswiftui.com/library/gauge/lineargaugestyle#source-code","@type":"SoftwareSourceCode","codeSampleType":"full example","description":"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","name":" LinearGaugeStyle SwiftUI Example","programmingLanguage":"Swift","runtimePlatform":"SwiftUI","text":"@State private var currentValue = 0.42\n\nvar body: some View {\n  VStack {\n    Gauge(value: 0.42) {\n      Text(\"Foo\")\n    }\n\n    Gauge(value: currentValue) {\n      Text(\"Foo\")\n    } currentValueLabel: {\n      Text(\"\\(currentValue)\")\n    }\n    .padding(.vertical)\n\n    Gauge(value: currentValue) {\n      Text(\"Foo\")\n    } currentValueLabel: {\n      Text(\"42\")\n    } minimumValueLabel: {\n      Text(\"0\")\n    } maximumValueLabel: {\n      Text(\"100\")\n    }\n  }\n  .gaugeStyle(.linear)\n}","about":[{"@type":"Thing","name":"SwiftUI"},{"@type":"Thing","name":"Gauge"},{"@type":"Thing","name":" LinearGaugeStyle"}]},{"@id":"https://exploreswiftui.com/library/gauge/lineargaugestyle#breadcrumb","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","name":"Home","item":"https://exploreswiftui.com","position":1},{"@type":"ListItem","name":"Gauge","item":"https://exploreswiftui.com/library/gauge","position":2},{"@type":"ListItem","name":" LinearGaugeStyle","item":"https://exploreswiftui.com/library/gauge/lineargaugestyle","position":3}]},{"@id":"https://exploreswiftui.com/#logo","@type":"ImageObject","caption":"Explore SwiftUI","contentUrl":"https://exploreswiftui.com/apple-touch-icon.png","inLanguage":"en","url":"https://exploreswiftui.com/apple-touch-icon.png"},{"@id":"https://exploreswiftui.com/#/schema/image/1","@type":"ImageObject","contentUrl":"https://exploreswiftui.com/api/images/46/variants/264?v=1790073478842&r=2","inLanguage":"en","url":"https://exploreswiftui.com/api/images/46/variants/264?v=1790073478842&r=2"}]}
```