JVFloatLabeledTextField
UITextField subclass with floating labels - inspired by Matt D. Smith's design: http://dribbble.com/shots/1254439--GIF-Mobile-Form-Interaction?list=users
An iOS drop-in replacement for the standard text field that animates the placeholder upward as a floating label when the user starts typing, so they never lose track of what a form field is asking for.
JVFloatLabeledTextField is an iOS UI component that solves a common form usability problem on mobile devices. On small screens, forms often use placeholder text inside input fields to label what each field is for, since there is not enough space to put labels outside the fields. The problem is that as soon as a user starts typing, the placeholder disappears, and there is no longer any indication of what that field was asking for.
This component addresses that by animating the placeholder upward as a small floating label when the user begins to type. The label stays visible above the field while the user is entering their text, so they never lose track of what they are filling in. The concept, known as the float label pattern, was originally designed by Matt D. Smith and this library was the first implementation of it for iOS.
It works as a drop-in replacement for the standard iOS text field and text view components (UITextField and UITextView). It is written in Objective-C and supports iOS 9 and later. Developers can add it to a project using CocoaPods, Carthage, or Swift Package Manager, all common iOS dependency management tools.
The pattern became widely adopted after this library was released, and the README lists implementations for Android, various web frameworks including jQuery and AngularJS, Xamarin for cross-platform mobile, JavaFX, and several Swift rewrites. If you are building an iOS app with forms and want a cleaner experience than disappearing placeholders, this component provides that behavior with minimal setup.
Where it fits
- Replace plain UITextField inputs in an iOS login or signup form so users can always see what each field is for while typing.
- Add the float label pattern to a UITextView for a multi-line input like an address or notes field.
- Implement accessible, space-efficient forms in an iOS app without designing a custom label animation from scratch.