1.6.0 • Published 3 years ago

react-bootstrap-floating-label v1.6.0

Weekly downloads
541
License
MIT
Repository
github
Last release
3 years ago

React Bootstrap Floating Label

version updated size react

license issues contributors downloads

A handy form input element with a floating label for react, styled to fit bootstrap projects
note This package does not require bootstrap, instead it has default "bootstrap-like" stylings which allow it to fit in nicely with bootstrap projects.

Installation

With npm:

npm install react-bootstrap-floating-label react

With a CDN:

<script src="https://unpkg.com/react-bootstrap-floating-label"></script>

Example usage

import FloatingLabel from "react-bootstrap-floating-label";

<FloatingLabel />
<FloatingLabel label="Name: " />
<FloatingLabel label="Name: " id="myLabel" style={{width: "40%"}} onChange={event => console.log(event.target.value) } />

Props

can be used completely without props, however you will likely want to pass in some props in order to customize it to your needs.

PropTypePurpose
idstringID of the wrapper div
labelIdstringID of the internal label element
inputIdstringID of the internal input element
onChangefunctionCallback function to run on change. Accepts parameter event
onChangeDelaynumberNumber of milliseconds to delay onChange callback by. Will reset on new change events
onBlurfunctionCallback function to run on blur. Accepts parameter event
onFocusfunctionCallback function to run on focus. Accepts parameter event
classNamestringClass(es) to apply to the wrapper div
labelClassNamestringClass(es) to apply to the internal label element
inputClassNamestringClass(es) to apply to the internal input element
typestringHTML5 input type. Defaults to text
labelstringLabel text to display inside input
styleobjectReact type styles to apply to the wrapper div
labelStyleobjectReact type styles to apply to the internal label element
inputStyleobjectReact type styles to apply to the internal input element
1.6.0

3 years ago

1.5.0

3 years ago

1.4.13

3 years ago

1.4.12

3 years ago

1.4.11

3 years ago

1.4.6

3 years ago

1.4.5

3 years ago

1.4.4

3 years ago

1.4.3

3 years ago

1.4.2

3 years ago

1.4.1

3 years ago

1.4.9

3 years ago

1.4.8

3 years ago

1.4.10

3 years ago

1.4.7

3 years ago

1.3.8

3 years ago

1.3.7

3 years ago

1.3.6

3 years ago

1.3.5

3 years ago

1.3.4

3 years ago

1.3.3

3 years ago

1.3.2

3 years ago

1.3.1

3 years ago

1.3.0

3 years ago

1.2.4

3 years ago

1.2.3

3 years ago

1.2.2

3 years ago

1.2.1

3 years ago