react-native-material-textinput
TypeScript icon, indicating that this package has built-in type declarations

1.4.1 • Public • Published

Material Design Text Input

npm version npm downloads github issues bundlephobia license

Textual input component for React Native (iOS & Android).

example

Usage

import React, { useState } from 'react'
import TextInput from 'react-native-material-textinput'

const Example = () => {
  const [name, setName] = useState('')

  const handleInputChange = (value) => setName(value)

  return <TextInput label="Name" value={name} onChangeText={handleInputChange} />
}

export default Example

Properties

Label

name type default
label String
labelDuration Number 200
labelColor String gray
labelActiveTop Number -18
labelActiveColor String #3f51b5
labelActiveScale Number 0.8

Placeholder

Name Type Default
placeholder String
placeholderColor String gray

Input

Name Type Default
inputRef Ref
minHeight Number
height Number
maxHeight Number
marginTop Number
marginRight Number
marginBottom Number 8
marginLeft Number
paddingTop Number 20
paddingRight Number 0
paddingBottom Number 8
paddingLeft Number 0
color String black
activeColor String
fontFamily String
fontSize Number 15
fontWeight String or Number normal
onFocus Function
onBlur Function
onChangeText Function
onContentSizeChange Function

Underline

Name Type Default
underlineDuration Number 200
underlineHeight Number 1
underlineColor String gray
underlineActiveColor String #3f51b5
underlineActiveHeight Number 2

ErrorHelper

Name Type Default
error String
errorPaddingTop Number 8
errorColor String #fc1f4a
errorFontSize Number 12

Other TextInput properties will also work

RTL

Supported using I18nManager from react-native

License

The MIT License.

See LICENSE

Package Sidebar

Install

npm i react-native-material-textinput

Weekly Downloads

228

Version

1.4.1

License

MIT

Unpacked Size

90.9 kB

Total Files

59

Last publish

Collaborators

  • maximpostnikov