Floating Form Field Labels With jQuery And CSS3 - Floatify

File Size: 18.5 KB
Views Total: 1962
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
Floating Form Field Labels With jQuery And CSS3 - Floatify

Floatify is a super tiny jQuery plugin that makes the placeholders displayed as floating labels on the top of the text fields while typing.

Supports both textarea and input field. The plugin uses CSS3 to animate the floating input labels with a fade-in effect.

Inspired by Matt D. Smith's Float Label Form Interaction.

How to use it:

1. Load the JavaScript jquery.floatify.js and Stylesheet jquery.floatify.css in the document which has jQuery library loaded.

<link rel="stylesheet" href="/dist/jquery.floatify.css">
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" 
<script src="/dist/jquery.floatify.js"></script>

2. Add placeholders to your text fields.

<input type="text" placeholder="First name">

<input type="text" placeholder="Last name">

<input type="text" value="23" placeholder="Age">

<textarea placeholder="Message"></textarea>


3. Attach the plugin to the text fields. Done.


  $('input, textarea').floatify();


4. Set the position of the floating labels. Default: left.


  $('input, textarea').floatify({
    position: 'right'


5. Set the margin-left (position: left) or margin-right (position: right) of the floating labels.


  $('input, textarea').floatify({
    hGap: 20 // default: 10px




  • v0.0.2


  • v0.0.1


This awesome jQuery plugin is developed by digitalify. For more Advanced Usages, please check the demo page or visit the official website.