You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

react-native-material-textinput

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-material-textinput

Textual input component for React Native

1.5.0
latest
Source
npmnpm
Version published
Maintainers
1
Created
Source

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, { TextInputRef } from 'react-native-material-textinput'

const Example = () => {
  const inputRef = useRef<TextInputRef>(null)
  const [name, setName] = useState('')

  const handleInputChange = (value: typeof name) => setName(value)

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

export default Example

Properties

Label

nametypedefault
labelString
labelDurationNumber200
labelColorStringgray
labelActiveTopNumber-18
labelActiveColorString#3f51b5
labelActiveScaleNumber0.8

Placeholder

NameTypeDefault
placeholderString
placeholderColorStringgray

Input

NameTypeDefault
refRef
minHeightNumber
heightNumber
maxHeightNumber
marginTopNumber
marginRightNumber
marginBottomNumber8
marginLeftNumber
paddingTopNumber20
paddingRightNumber0
paddingBottomNumber8
paddingLeftNumber0
colorStringblack
activeColorString
fontFamilyString
fontSizeNumber15
fontWeightString or Numbernormal
onFocusFunction
onBlurFunction
onChangeTextFunction
onContentSizeChangeFunction

Underline

NameTypeDefault
underlineDurationNumber200
underlineHeightNumber1
underlineColorStringgray
underlineActiveColorString#3f51b5
underlineActiveHeightNumber2

ErrorHelper

NameTypeDefault
errorString
errorPaddingTopNumber8
errorColorString#fc1f4a
errorFontSizeNumber12

Other TextInput properties will also work

RTL

Supported using I18nManager from react-native

License

The MIT License.

See LICENSE

Keywords

react

FAQs

Package last updated on 26 May 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts