A material design styled floating label input.
Branch: master
Clone or download
hemanth Merge pull request #1 from asvny/master
Add react-dom and utility bind method
Latest commit 3c1dacf Mar 11, 2017
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
.snyk
LICENSE Initial commit Mar 12, 2016
README.md Demo link Mar 18, 2016
app.js
main.js Merge branch 'master' into master Mar 11, 2017
master.css
package.json

README.md

react-floating-label

Floating label input.

Checkout the DEMO

Install it:

npm install --save react-floating-label

Usage:

var FloatingLabel = require('react-floating-label');

<FloatingLabel
	errorMsg='Full name can contain only the alphabets and space'
	pattern={/^[a-z\s]+$/i}/>

Props:

autoComplete: PropTypes.bool,
errorMsg: PropTypes.string,
placeholder: PropTypes.string.isRequired,
pattern: PropTypes.any,
type: PropTypes.string.isRequired,
id: PropTypes.string.isRequired,
isDisabled: PropTypes.bool

Building and running:

Lifecycle scripts included in react-floating-label:
  start
    ecstatic -p 8000 public

available via `npm run-script`:
  build-js
    NODE_ENV=production browserify main.js | uglifyjs -cm > public/bundle.js
  build-css
    cat master.css > public/bundle.css
  build
    npm run build-js && npm run build-css
  watch-js
    watchify main.js -o public/bundle.js -dv
  watch-css
    catw master.css -o public/bundle.css -v
  watch
    npm run watch-js & npm run watch-css

License:

MIT