1.0.6 • Published 6 years ago

floating-labels v1.0.6

Weekly downloads
8
License
MIT
Repository
github
Last release
6 years ago

Floating labels CSS (only)

This Package is build over bootsrtap 3.x CSS floating labels Demo

default-behavior

Installation

npm install floating-labels --save

Usage

Add the floating label script in your styles as follow

@import "~floating-labels";

Examples

All You need now is:

  1. Make sure that the input you need to have a floating label have the required attr.
  2. Add the class group to the input wrapper like the example below.
  3. Add the <span class="bar"></span> after the input so it gives you the line effect.
<div class="form-group group">
    <input id="email" type="email" class="form-control" name="email" required />
    <span class="bar"></span>
    <label for="email">E-Mail Address</label>
</div>

default-styles

Helper Classes

1. Error styles

you need to add class has-error along with class group

<div class="form-group group has-error">
    <input id="email" type="email" class="form-control" name="email" required />
    <span class="bar"></span>
    <label for="email">E-Mail Address</label>
</div>

error-styles

2. Warning styles

you need to add class has-warning along with class group

<div class="form-group group has-warning">
    <input id="email" type="email" class="form-control" name="email" required />
    <span class="bar"></span>
    <label for="email">E-Mail Address</label>
</div>

warning-styles

3. Success styles

you need to add class has-success along with class group

<div class="form-group group has-success">
    <input id="email" type="email" class="form-control" name="email" required />
    <span class="bar"></span>
    <label for="email">E-Mail Address</label>
</div>

success-styles

4. Info styles

you need to add class has-info along with class group

<div class="form-group group has-info">
    <input id="email" type="email" class="form-control" name="email" required />
    <span class="bar"></span>
    <label for="email">E-Mail Address</label>
</div>

info-styles

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago