<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: 16.0.0 -",
    "macOS: 13.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 7.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/Gauge/init(value:in:label:currentValueLabel:minimumValueLabel:maximumValueLabel:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI5GaugeV5value2in5label17currentValueLabel07minimumhI007maximumhI0ACyxq_q0_AA9EmptyViewVGqd___SNyqd__GxyXEq_yXEq0_yXEq0_yXEtcAKRs1_SBRd__lufc"
  },
  "title" : "init(value:in:label:currentValueLabel:minimumValueLabel:maximumValueLabel:)"
}
-->

# init(value:in:label:currentValueLabel:minimumValueLabel:maximumValueLabel:)

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

```
nonisolated init<V>(value: V, in bounds: ClosedRange<V> = 0...1, @ContentBuilder label: () -> Label, @ContentBuilder currentValueLabel: () -> CurrentValueLabel, @ContentBuilder minimumValueLabel: () -> BoundsLabel, @ContentBuilder maximumValueLabel: () -> BoundsLabel) where MarkedValueLabels == EmptyView, V : BinaryFloatingPoint
```

## Parameters

`value`

The value to show on the gauge.

`bounds`

The range of the valid values. Defaults to `0...1`.

`label`

A view that describes the purpose of the gauge.

`currentValueLabel`

A view that describes the current value of
the gauge.

`minimumValueLabel`

A view that describes the lower bounds of the
gauge.

`maximumValueLabel`

A view that describes the upper bounds of the
gauge.

## Discussion

Use this method to create a gauge that shows a value within a
prescribed bounds. The gauge has labels that describe its purpose,
and for the gauge’s current, minimum, and maximum values.

```
struct LabeledGauge: View {
    @State private var current = 67.0
    @State private var minValue = 0.0
    @State private var maxValue = 170.0

    var body: some View {
        Gauge(value: current, in: minValue...maxValue) {
            Text("BPM")
        } currentValueLabel: {
            Text("\(Int(current))")
        } minimumValueLabel: {
            Text("\(Int(minValue))")
        } maximumValueLabel: {
            Text("\(Int(maxValue))")
        }
    }
}
```

![A screenshot of a gauge, labeled BPM, that’s represented by a](images/com.apple.SwiftUI/SwiftUI-Gauge-LabeledCircular@2x.png)

---

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)