christian
0
Q:

how to style textfield swiftui

struct ButtonAndTextFieldView : View {

    @State var text: String = ""

    var body: some View {
        HStack {
            TextField($text,
                      placeholder: Text("type something here..."))
            Button(action: {
                // Closure will be called once user taps your button
                print(self.$text)
            }) {
                Text("SEND")
            }
        }
    }
}
1
TextField("Enter some text", text: $yourBindingHere)
    .textFieldStyle(RoundedBorderTextFieldStyle())
0

New to Communities?

Join the community