2.0.0 • Published 5 years ago

@verticalstrategy/react-native-floating-label-text-input v2.0.0

Weekly downloads
41
License
MIT
Repository
github
Last release
5 years ago

React Native Floating Label Text Input

Used as an alternative to TextInput by us in Vertical Strategy, we thought you might love it too.

Installation

yarn add @verticalstrategy/react-native-floating-label-text-input

Usage

import FloatingLabelTextInput from 'react-native-floating-label-text-input'

<FloatingLabelTextInput
  containerStyle={{ width: '100%', height: 45 }}
  onChangeText={this.onChangeText}
  placeholder={`Name`}
  value={this.state.name}
/>

Props

Besides TextInput Props, the following props can be passes to the component.

ParamTypeDescription
containerStyleanyStyles for the container wrapping the internal TextInput and label.
labelstringIf provided, this will be displayed in the label instead of the placeholder text.
labelStyleanyStyles for the label.
underlineColorAndroidstringPassed as underlineColorAndroid to TextInput
innerReffuncPassed as ref to TextInput