Swift95

Text​Field95

A single-line native text field with a sunken Swift95 input surface.

TextField95 preserves SwiftUI editing, focus, submission, and accessibility behavior while supplying classic input styling.

TextField95 containing Jane Doe
The compact, complete field rendered by the snippet below.

Use it

import Swift95
import SwiftUI

struct TextField95Example: View {
  @State private var name = "Jane Doe"

  var body: some View {
    TextField95("Name", text: $name)
      .swiftUI { field in
        field.textContentType(.name)
      }
      .frame(width: 380)
  }
}

Essential behavior

BindingReads and writes the supplied String binding.
Native APIsUse swiftUI(_:) for content type, capitalization, focus, and submit behavior.
SizingThe field accepts its parent’s proposed width; constrain it in wide forms when a shorter value is expected.
StateDisabled colors and the sunken bevel come from the active Theme95.

Related

Open the complete TextField95 API reference →