Skip to content

TextField

A controlled native SwiftUI text field with edit and submit callbacks.

#Import

Import TextField from @quickgui/solid/swift-ui.

import { Host, TextField } from "@quickgui/solid/swift-ui";

#Usage

<Host matchContents={{ vertical: true }} style={{ width: 280 }}>
  <TextField
    value={name()}
    placeholder="Name"
    onValueChange={setName}
    onSubmit={save}
  />
</Host>

#API reference

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

TextField

View source
TextField(props: TextFieldProps): NativeNode
testIDstring—

Stable identifier exposed to macOS accessibility and UI testing.

string
View source
modifiersViewModifier[]—

SwiftUI modifiers, applied in array order.

ViewModifier[]
View source
valuestring—

Controlled field value.

string
View source
placeholderstring—

Declares placeholder (optional). Reactive JSX expressions update this property in place.

string
View source
onValueChange(value: string, event: QuickGuiEvent) => void—

Declares onValueChange (optional). Reactive JSX expressions update this property in place.

(value: string, event: QuickGuiEvent) => void
View source
onSubmit(event: QuickGuiEvent) => void—

Declares onSubmit (optional). Reactive JSX expressions update this property in place.

(event: QuickGuiEvent) => void
View source
ref((node: NativeNode) => void) | NativeNode—

Declares ref (optional). Reactive JSX expressions update this property in place.

((node: NativeNode) => void) | NativeNode
View source