Compose SwiftUIv0.4.0
esc
GuideAPIGitHub
View

Gauge

A view that shows a value within a range.

iOS 17.0+macOS 14.0+tvOS: unavailable (no-op)watchOS 10.0+
fun Gauge(value: Double, bounds: ClosedFloatingPointRange<Double>, modifier: Modifier = Modifier, content: @Composable () -> Unit)

Overview

Gauge(value = 0.0, bounds = ClosedFloatingPointRange.…) { … }

This is the Kotlin form of SwiftUI Gauge.init(value:in:label:): SwiftUI documentation. In Swift it reads:

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

Topics

Creating a Gauge

fun Gauge(value: Double, bounds: ClosedFloatingPointRange<Double>, modifier: Modifier = Modifier, label: @Composable () -> Unit, currentValueLabel: @Composable () -> Unit, markedValueLabels: @Composable () -> Unit)
SwiftUI Gauge.init(value:in:label:currentValueLabel:markedValueLabels:)
fun Gauge(value: Double, bounds: ClosedFloatingPointRange<Double>, modifier: Modifier = Modifier, label: @Composable () -> Unit, currentValueLabel: @Composable () -> Unit, minimumValueLabel: @Composable () -> Unit, maximumValueLabel: @Composable () -> Unit, markedValueLabels: @Composable () -> Unit)
SwiftUI Gauge.init(value:in:label:currentValueLabel:minimumValueLabel:maximumValueLabel:markedValueLabels:)
fun Gauge(value: Double, bounds: ClosedFloatingPointRange<Double>, modifier: Modifier = Modifier, label: @Composable () -> Unit, currentValueLabel: @Composable () -> Unit, minimumValueLabel: @Composable () -> Unit, maximumValueLabel: @Composable () -> Unit)
SwiftUI Gauge.init(value:in:label:currentValueLabel:minimumValueLabel:maximumValueLabel:)
fun Gauge(value: Double, bounds: ClosedFloatingPointRange<Double>, modifier: Modifier = Modifier, label: @Composable () -> Unit, currentValueLabel: @Composable () -> Unit)
SwiftUI Gauge.init(value:in:label:currentValueLabel:)
fun Gauge(value: Double, bounds: ClosedFloatingPointRange<Double>, modifier: Modifier = Modifier, content: @Composable () -> Unit)
SwiftUI Gauge.init(value:in:label:)