@ticmakers-react-native/input
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

TIC Makers - React Native Input

React native component for input.

Powered by TIC Makers

Demo

Input Expo's snack

Install

Install @ticmakers-react-native/input package and save into package.json:

NPM

$ npm install @ticmakers-react-native/input --save

Yarn

$ yarn add @ticmakers-react-native/input

How to use?

import React from 'react'
import { AppLoading, Font } from 'expo'
import Input from '@ticmakers-react-native/input'

export default class App extends React.Component {
  userInput = null
  passInput = null

  render() {
    return (
      <View>
        <Input
          lang="es"
          label="Username"
          ref={ c => this.userInput = c }
          iconLeft={{ name: 'account-circle', type: 'material-community' }}
          rules={{ required: true, minLength: 3, maxLength: 8, email: true }}
        />

        <Input
          password
          label="Password"
          ref={ c => this.passInput = c }
          iconLeft={{ name: 'key', type: 'material-community' }}
          rules={{ required: true, minLength: 3, maxLength: 8 }}
        />
      </View>
    )
  }

  getValues() {
    return ({
      user: userInput.value,
      pass: passInput.value,
    })
  }
}

Properties

Name Type Default Value Definition
name - - -

Todo

  • Test on iOS
  • Improve and add new features
  • Add more styles
  • Improve readme (example & demo)
  • Create tests

Version 1.0.3 (Changelog)

Package Sidebar

Install

npm i @ticmakers-react-native/input

Weekly Downloads

1

Version

1.0.3

License

BSD-3-Clause

Unpacked Size

520 kB

Total Files

50

Last publish

Collaborators

  • ticmakers