Skip to content

SecureField

The concealed native editor with the same controlled contract as TextField.

#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 SwiftUiSecureFieldExample() *native.Node {
	text, setText := ui.CreateSignal("")
	return ui.SwiftUI.Host(
		ui.SwiftUIHostProps{MatchContents: true},
		func() *native.Node {
			return ui.SwiftUI.SecureField(ui.SwiftUITextFieldProps{
				Value:         text,
				Placeholder:   "Enter text",
				OnValueChange: func(next string, _ *native.Event) { setText(next) },
			})
		},
	)
}

#API reference

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

SwiftUI.SecureField

View source
ui.SwiftUI.SecureField(props SwiftUITextFieldProps) *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
Placeholderany—

Hint displayed while the text value is empty.

any
View source
OnValueChangefunc(string, *native.Event)—

Reports an accepted value change. Use the callback payload to update controlled state.

func(string, *native.Event)
View source
OnSubmitfunc(*native.Event)—

Called when the control submits its current value.

func(*native.Event)
View source