SwiftUI - Customize TextField Border with border Modifier

From PeformIQ Upgrade
Jump to navigation Jump to search

Customize TextField Border with border Modifier

struct ContentView: View {
    @State private var text = ""

    var body: some View {
        TextField("Enter text", text: $text)
            .padding(10)
            .border(Color.blue, width: 2)
            .padding()
    }
}