Latest 1.0.3
License MIT
Platforms ios 9.0



A Swift 4.2 implementation of the UX pattern known as the "Float Label Pattern".

FAFloatLabeledTextInput includes subclasses for both UITextField and UITextView. Additionally, it provides a UITableViewCell subclass for each thats ready to work out of the box, and the FAFloatLabeledTextViewTableViewCell is configured to grow as needed to accommodate text.

This design was heavily inspired by @jverdi’s JVFloatLabeledTextField and @aksswami’s FloatLabelFields.

Standard Example

UITableViewCell Example


Simply use FAFloatLabledTextField or FAFloatLabledTextView in place of UITextField or UITextView.

The UITableViewCell subclasses can be used directly in code, or in Interface Builder by setting the prototype cell’s class to either FAFloatLabeledTextFieldTableViewCell or FAFloatLabeledTextViewTableViewCell.

let titleField = FAFloatLabelTextField()
titleField.placeholder = "Title"
titleField.placeholderFont = .systemFont(ofSize: 16.0)
titleField.floatingLabelFont = .boldSystemFont(ofSize: 11.0)

let description = FAFloatLabelTextView()
descriptionField.placeholder = "Description"
descriptionField.placeholderFont = .systemFont(ofSize: 16.0)
descriptionField.floatingLabelFont = .boldSystemFont(ofSize: 11.0)

The code is well documented, and there are many options available, so I encourage you to give it a read.

Example Project

To run the example project, clone the repo, and run pod install from the Example directory first.


This component uses Swift 4.2, which means it requires iOS 7 or later.


FAFloatLabeledTextInput is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod 'FAFloatLabeledTextInput'



Ideas? Questions? Open an issue, or hit me up on Twitter.


FAFloatLabeledTextInput is available under the MIT license. See the LICENSE file for more info.

Latest podspec

    "name": "FAFloatLabeledTextInput",
    "version": "1.0.3",
    "summary": "Floating Labels For UITextField And UITextView",
    "description": "Like it says on the box, FAFloatLabeledTextInput contains subclasses for UITextField and UITextView that allow for floating labels.nnAlso included are some UITableViewCell subclasses that wrap the UITextField and UITextView subclasses, with the latter allowing for automatic height adjustment so it can grow as you add new lines.",
    "homepage": "",
    "screenshots": [
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    "authors": {
        "forgot": "[email protected]"
    "source": {
        "git": "",
        "tag": "1.0.3"
    "social_media_url": "",
    "swift_version": "4.2",
    "platforms": {
        "ios": "9.0"
    "source_files": "FAFloatLabeledTextInput/Classes/**/*"

Pin It on Pinterest

Share This