FloatingLabelTextFieldSwiftUI
FloatingLabelTextFieldSwiftUI is a small and lightweight SwiftUI framework written in completely swiftUI (not using UIViewRepresentable) that allows to create beautiful and customisable floating label textfield! This library support RTL text (eg. Arabic) and easy to add left view and right view to your text field and customizable.
If you like the project, please do not forget to star ★
this repository and follow me on GitHub.
? Requirements
- iOS 13.0+
- Xcode 11.2+
- Swift 5.0
? Usage
To start using the component add it to your project using CocoaPods or Swift Package. First of all import FloatingLabelTextFieldSwiftUI
FloatingLabelTextFieldStyle and Colors:
You can customize the colors of the textfield by using FloatingLabelTextFieldStyle property or create your own style and set a few properties.
Property
FloatingLabelTextFieldStyle
Just two step for create and add style to FloatingLabelTextField.
- Create your own theme style. Set property as per your theme.
- Add style to FloatingLabelTextField.
Secure Text Entry
To enable Secure Text Entry use .isSecureTextEntry(true) property.
Left - Right View
Yes, you can easily add your own views, buttons or image to left view or right view of the FloatingLabelTextField.
? Coming soon
- Error Message and Validation
? Examples
To run the example project, clone the repo, and run pod install
from the Example directory first.
? Installation
CocoaPods:
FloatingLabelTextFieldSwiftUI is available through CocoaPods. To install
it, simply add the following line to your Podfile:
Swift Package Manager
The Swift Package Manager is a tool for managing the distribution of Swift code. It’s integrated with the Swift build system to automate the process of downloading, compiling, and linking dependencies.
To integrate FloatingLabelTextFieldSwiftUI
into your Xcode project using Xcode 11+, specify it in File > Swift Packages > Add
:
Manual
You can download the latest files from our Releases page. After doing so, copy the files in the Sources
folder to your project.
Author
kishanraja, rajakishanrk1996@gmail.com