ColorPicker
A native SwiftUI color well that returns CSS-style RGBA color strings.
#Import
Import ui from github.com/egoist/quickgui/go/ui.
import (
"github.com/egoist/quickgui/go/native"
"github.com/egoist/quickgui/go/ui"
)#Usage
func SwiftUiColorPickerExample() *native.Node {
value, setValue := ui.CreateSignal("#2563ebff")
return ui.SwiftUI.Host(
ui.SwiftUIHostProps{MatchContents: true},
func() *native.Node {
return ui.SwiftUI.ColorPicker(ui.SwiftUIColorPickerProps{
Selection: value,
Label: "Accent",
SupportsOpacity: true,
OnSelectionChange: func(next string, _ *native.Event) { setValue(next) },
})
},
)
}#API reference
Expand an entry for its description and complete signature. A dash means no declaration default is documented.
SwiftUI.ColorPicker
View sourceui.SwiftUI.ColorPicker(props SwiftUIColorPickerProps) *native.NodeTestIDany—
Modifiersany—
Reffunc(*native.Node)—
Receives the retained native node after construction. Keep imperative work in event or lifecycle callbacks.
func(*native.Node)View source