Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-native-tecnovix-material-textfield

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-tecnovix-material-textfield

Material textfield

  • 0.18.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Owner of lib

https://github.com/n4kz/react-native-material-textfield https://www.npmjs.com/package/react-native-material-textfield

Copyright 2017 Alexander Nazarov

Adaptations of inputs with specific customizations

react-native-tecnovix-material-textfield

npm license travis codeclimate

Material texfield with consistent behaviour on iOS and Android

example

Features

  • Material design guidelines compliance
  • Consistent look and feel on iOS and Android
  • Animated state transitions (normal, focused and errored)
  • Customizable font size, colors and animation duration
  • Disabled state (with dotted underline)
  • Multiline text input
  • Character counter
  • Prefix and suffix
  • Accessory view
  • Helper text
  • RTL support
  • Pure javascript implementation

Installation

npm install --save react-native-tecnovix-material-textfield

Usage

import React, { Component } from 'react';
import { TextField } from 'react-native-tecnovix-material-textfield';

class Example extends Component {
  state = {
    phone: ''
  };

  render() {
    let { phone } = this.state;

    return (
      <TextField
        label="Phone number"
        value={phone}
        onChangeText={phone => this.setState({ phone })}
      />
    );
  }
}

Properties

namedescriptiontypedefault
textColorText input colorStringrgba(0, 0, 0, .87)
fontSizeText input font sizeNumber16
titleFontSizeText field title and error fontSizeNumber12
labelFontSizeText field label font sizeNumber12
labelHeightText field label base heightNumber32
labelPaddingText field label base paddingNumber4

| fontAnimate | when I was in focus use alterative font | Number | 4
| | inputContainerPadding | Text field input container base padding | Number | 8 | | lineWidth | Text field underline width | Number | 0.5 | | activeLineWidth | Text field active underline width | Number | 2 | | disabledLineWidth | Text field disabled underline width | Number | 1 | | tintColor | Text field accent color | String | rgb(0, 145, 234) | | baseColor | Text field base color | String | rgba(0, 0, 0, .38) | | label | Text field label text | String | - | | title | Text field helper text | String | - | | prefix | Text field prefix text | String | - | | suffix | Text field suffix text | String | - | | error | Text field error text | String | - | | errorColor | Text field color for errored state | String | rgb(213, 0, 0) | | disabledLineType | Text field line type in disabled state | String | dotted | | animationDuration | Text field animation duration in ms | Number | 225 | | characterRestriction | Text field soft limit for character counter | Number | - | | disabled | Text field availability | Boolean | false | | editable | Text field text can be edited | Boolean | true | | multiline | Text filed multiline input | Boolean | false | | inputContainerStyle | Style for input container view | Object | - | | containerStyle | Style for container view | Object | - | | labelTextStyle | Style for label inner Text component | Object | - | | titleTextStyle | Style for title inner Text component | Object | - | | affixTextStyle | Style for affix inner Text component | Object | - | | renderAccessory | Render input accessory view | Function | - | | onChangeText | Change text callback | Function | - | | onFocus | Focus callback | Function | - | | onBlur | Blur callback | Function | - |

Other TextInput properties will also work

Methods

namedescriptionreturns
focus()Acquire focus-
blur()Release focus-
clear()Clear text field-
value()Get current valueString
isFocused()Get current focus stateBoolean
isRestricted()Get current restriction stateBoolean

Example

git clone https://github.com/n4kz/react-native-tecnovix-material-textfield
cd react-native-tecnovix-material-textfield/example
npm install
npm run ios # or npm run android

BSD License

Copyright 2017 Alexander Nazarov. All rights reserved.

Keywords

FAQs

Package last updated on 12 Apr 2019

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc