Home

Awesome

<a href="https://www.simform.com/"><img src="https://github.com/mobile-simformsolutions/SSFloatingLabelTextField/blob/main/screenshots/simformBanner.png"></a>

Platform Swift Version License PRs Welcome

SSFloatingLabelTextField

SSFloatingLabelTextField is a small library for iOS which supports Floating labels and errors with different kind of validations. Also user can add/customise own validation and error messages.

Alt text

Features!

Main Features include :-

All Attributes :-

AttributeDescription
floatingLabelTextFloating Placeholder label
selectedLabelColorColor of Floating label when textfield is active
unSelectedLabelColorColor of Floating label when textfield is active
errorTextError message when text is not valid
errorTextColorColor in which error message is shown
typeSet Validation type
customValidationRegexSet Custom Regex for Validation
isPasswordToggleEnableToggle show hide password
showPasswordImageToggle image when password is visible
hidePasswordImageToggle image when password is visible

Requirements

- iOS 11.0+
- Xcode 11+

Installation

CocoaPods

Usage example

In the storyboard add a UITextField and change its class to SSFloatingLabelTextField

<img src="https://github.com/mobile-simformsolutions/SSFloatingLabelTextField/blob/main/screenshots/Installation.png">

Import SSFloatingLabelTextField

    import SSFloatingLabelTextField
    

Set text type in your View Controller file :-

    @IBOutlet weak var txtUsername: SSFloatingLabelTextField! // Add IBOutlet
    txtEmail.type = .email // Assign type as email
    txtPassword.type = .password(passwordRule: .medium) // Assign type as password 
    txtPhoneNumber.type = .phoneNumber(formatterString: nil) // Assign type as phone number (Params :- Phone number formatter default :- XXX-XXX-XXXX )
    

Check if given text field is valid or not :-

    txtUsername.isValid()
    

Find this library useful? :heart:

Support it by joining stargazers for this repository. :star:

🤝 How to Contribute

Whether you're helping us fix bugs, improve the docs, or a feature request, we'd love to have you! :muscle:

Check out our Contributing Guide for ideas on contributing.

Bugs and Feedback

For bugs, feature requests, and discussion please use GitHub Issues.

Meta