---
title: "init(value:in:label:currentValueLabel:)"
framework: swiftui
role: symbol
role_heading: Initializer
path: "swiftui/gauge/init(value:in:label:currentvaluelabel:)"
---

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

Creates a gauge showing a value within a range and that describes the gauge’s purpose and current value.

## Declaration

```swift
nonisolated init<V>(value: V, in bounds: ClosedRange<V> = 0...1, @ContentBuilder label: () -> Label, @ContentBuilder currentValueLabel: () -> CurrentValueLabel) where BoundsLabel == EmptyView, 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.

## Discussion

Discussion Use this method to create a gauge that displays a value within a range you supply with labels that describe the purpose of the gauge and its current value. In the example below, a gauge using the circular style shows its current value of 67 along with a label describing the (BPM) for the gauge: struct SimpleGauge: View {     @State private var current = 67.0

var body: some View {         Gauge(value: current, in: 0...170) {             Text("BPM")         } currentValueLabel: {             Text("\(current)")         }         .gaugeStyle(.circular)    } }

## See Also

### Creating a gauge

- [init(value:in:label:)](swiftui/gauge/init(value:in:label:).md)
- [init(value:in:label:currentValueLabel:markedValueLabels:)](swiftui/gauge/init(value:in:label:currentvaluelabel:markedvaluelabels:).md)
- [init(value:in:label:currentValueLabel:minimumValueLabel:maximumValueLabel:)](swiftui/gauge/init(value:in:label:currentvaluelabel:minimumvaluelabel:maximumvaluelabel:).md)
- [init(value:in:label:currentValueLabel:minimumValueLabel:maximumValueLabel:markedValueLabels:)](swiftui/gauge/init(value:in:label:currentvaluelabel:minimumvaluelabel:maximumvaluelabel:markedvaluelabels:).md)
