New:Introducing Socket Scanning for VS Code Marketplace Extensions.Learn more →
Get Started

react-bootstrap-floating-label

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-bootstrap-floating-label

React form element with floating label text

latest
Source
npmnpm
Version
1.6.0
Version published
Weekly downloads
52
-59.37%
Maintainers
1
Weekly downloads
 
Created
Source

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

Keywords

React

FAQs

Package last updated on 21 Jun 2021

Related posts