<!--
{
  "availability" : [
    "watchOS: 7.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/GaugeStyle/linear",
  "metadataVersion" : "0.1.0",
  "role" : "Type Property",
  "symbol" : {
    "kind" : "Type Property",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI10GaugeStylePA2A06LinearcD0VRszrlE6linearAEvpZ"
  },
  "title" : "linear"
}
-->

# linear

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.

```
@MainActor @export(implementation) @preconcurrency static var linear: LinearGaugeStyle { get }
```

## Discussion

Apply this style to a [`Gauge`](/documentation/SwiftUI/Gauge) or to a view hierarchy that contains
gauges using the [`gaugeStyle(_:)`](/documentation/SwiftUI/View/gaugeStyle(_:)) modifier:

```
Gauge(value: batteryLevel, in: 0...100) {
    Text("Battery Level")
}
.gaugeStyle(.linear)
```

If you provide `minimumValueLabel` and `maximumValueLabel`
parameters when you create the gauge, they appear on leading and
trailing edges of the bar, respectively. Otherwise, the gauge
displays the `currentValueLabel` value on the leading edge.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)