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
Platform Compatibility
Tags
SwiftUI Code
@State private var currentValue = 0.42
var body: some View {
VStack {
Gauge(value: currentValue) {
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(.accessoryLinear)
}Found an issue or have a suggestion?
More Gauge Components
View allCircularGaugeStyle
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
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
AccessoryLinearCapacityGaugeStyle
A gauge style that displays bar that fills from leading to trailing edges as the gauge’s current value increases
LinearCapacityGaugeStyle
A gauge style that displays a bar that fills from leading to trailing edges as the gauge’s current value increases
AccessoryCircularCapacityGaugeStyle
A gauge style that displays a closed ring that’s partially filled in to indicate the gauge’s current value
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
Explore Other Components
Browse allSystem Image Label
Creates a label with a system icon image and a title generated from a localized string.
Glass Button Styles
A button style that applies glass border artwork based on the button’s context
Prefer Vertical Toolbar Items
A compression behavior that prioritizes keeping toolbar items visible over other elements, such as tabs. By default, tabs are prioritized.
Glass Effect Container
A view that combines multiple Liquid Glass shapes into a single shape that can morph individual shapes into one another