Skip to content

Gauge

A native SwiftUI gauge with linear and circular accessory styles.

#Import

Import ui from github.com/egoist/quickgui/go/ui.

import (
	"github.com/egoist/quickgui/go/ui"
)

#Usage

func SwiftUiGaugeExample() *native.Node {
	return ui.SwiftUI.Host(
		ui.SwiftUIHostProps{MatchContents: true},
		func() *native.Node {
			return ui.SwiftUI.Gauge(ui.SwiftUIGaugeProps{
				Value: 60,
				Min:   0,
				Max:   100,
				Label: "Capacity",
				Style: "accessoryLinearCapacity",
			})
		},
	)
}

#API reference

Expand an entry for its description and complete signature. A dash means no declaration default is documented.

SwiftUI.Gauge

View source
ui.SwiftUI.Gauge(props SwiftUIGaugeProps) *native.Node
TestIDany—

Stable identifier for native automation and tests.

any
View source
Modifiersany—

Ordered SwiftUI view modifiers applied to the hosted control.

any
View source
Reffunc(*native.Node)—

Receives the retained native node after construction. Keep imperative work in event or lifecycle callbacks.

func(*native.Node)
View source
Valueany—

The current controlled value. Update application state from the change callback to accept a new value.

any
View source
Minany—

Lower bound of the accepted value.

any
View source
Maxany—

Upper bound of the accepted value.

any
View source
Labelany—

Visible native SwiftUI control label.

any
View source
CurrentValueLabelany—

Readable label for the current native progress or gauge value.

any
View source
MinimumValueLabelany—

Accessible label for the minimum end of the range.

any
View source
MaximumValueLabelany—

Accessible label for the maximum end of the range.

any
View source
Stylestring—

Reusable layout, typography, color, and interaction-state styles. Build with ui.Style() and compose with Merge.

string
View source