1.0.2 • Published 4 years ago

react-native-input-style v1.0.2

Weekly downloads
10
License
MIT
Repository
github
Last release
4 years ago

React-Native-Input-Style

Styled Input With Animation, Label and Error text For React Native

Installation

Use the package manager yarn / npm to install React-Native-Input-Style.

npm install react-native-input-style --save

or

yarn add react-native-input-style

Example

Outlined example:

outlined

Regular example:

regular

Usage

import Input from 'react-native-input-style';

<Input
  onlyEnglish
  id="name"
  label="Full Name"
  keyboardType="default"
  required
  contain=" "
  autoCapitalize="sentences"
  errorText="Your name is invalid"
  onInputChange={YOUR_InputChangeHandler}
  initialValue=""
  outlined
  borderColor="blue"
  />

<Input
  id="password"
  label="password"
  keyboardType="default"
  secureTextEntry
  required
  submit={!isSignup && authHandler}
  minLength={6}
  maxLength={20}
  autoCapitalize="none"
  errorText="Your password is invalid"
  onInputChange={YOUR_InputChangeHandler}
  initialValue=""
  outlined
  borderColor="blue"
  />

Props

All the options of React-Native-textinput

More options:

PropertyTypeDefaultDescription
idstring-------Id of input value
labelstring-------Label of input type.
requiredbooleanfalseThe input value is necessary
submitfunction-------On submit editing
minLengthnumber-------Minimum digits for value
maxLengthnumber-------Maximum digits for value
minnumber-------Minimum value of input value
maxnumber-------Maximum value of input value
emailbooleanfalseInput supposed to be email
maxLengthboolean-------Maximum digits for value
maxLengthboolean-------Maximum digits for value
maxLengthboolean-------Maximum digits for value
containstring-------Input has to contain value
errorTextstring-------Error text under the value
onInputChangefunction-------Input change function
initialValuestring-------Initial value of input
initiallyValidbooleanfalseInitial value is valid
outlinedbooleanfalseType of the input style
borderColorstringgrayColor of border
fontSize (for outlined)number18Start font size of label in input
rightbooleanfalseIf label and error text should be right side
formControlStyleobject-------Specific style of form control
errorContainerStyleobject-------Specific style of error container
errorTextobject-------Specific style of error text
labelStyleobject-------Specific style of label
inputStyleobject-------Specific style of input

Author

Rom Ovadia

CD-ROM

License

MIT