Text input

Text inputs are used to capture textual information as well as numbers and passwords.


Cocoapods class reference view on Github

Day Night


Create a BPKTextField and bind the text property to a Binding<String>.

                                                @State var text: String = ""
                                                BPKTextField(text: $text)

Setting a placeholder

                                                BPKTextField("Placeholder", text: $text)

Changing the State

                                                BPKTextField(text: $text)

Adding a clear button

                                                @State var text: String = "some text"
                                                BPKTextField(text: $text)
                                                            accessibilityLabel: "Clear",
                                                            action: { text = "" }