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

react-native-material-textfield

Package Overview
Dependencies
Maintainers
1
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-material-textfield

Material textfield

  • 0.2.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
25K
increased by57.09%
Maintainers
1
Weekly downloads
 
Created
Source

react-native-material-textfield

Material texfield with consistent behaviour on iOS and Android

Example

Installation

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

Usage

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

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

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

    return (
      <TextField
        label='Phone number'
        ref='phone'
        value={phone}
        onBlur={ () => this.setState({ phone: this.refs.phone.value() }) }
      />
    );
  }
}

Properties

  • tintColor - Text field accent color (default: rgb(0, 145, 234))
  • textColor - Text input color (default: rgba(0, 0, 0, .87)
  • baseColor - Text field base color (default: rgba(0, 0, 0, .38))
  • label - Text field label text
  • error - Text field error text
  • errorColor - Text field color for errored state (default: rgb(213, 0, 0))
  • animationDuration - Text field animation duration in ms (default: 225)
  • characterRestriction - Text field soft limit for character counter
  • onFocus - Focus callback
  • onBlur - Blur callback

Methods

  • focus() - Acquire focus
  • blur() - Release focus
  • clear() - Clear text field
  • value() - Get current value
  • isFocused() - Get current focus state
  • isRestricted() - Get current restriction state

Example

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

BSD License

Copyright 2017 Alexander Nazarov. All rights reserved.

Keywords

FAQs

Package last updated on 17 Mar 2017

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