New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

react-native-textarea

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-textarea

React Native textarea component

latest
Source
npmnpm
Version
1.0.4
Version published
Weekly downloads
314
16.73%
Maintainers
1
Weekly downloads
 
Created
Source

English | 简体中文

react-native-textarea

npm package npm downloads build

React Native textarea component

Example

Installation

  • Install package via npm:
$ npm install --save react-native-textarea
  • Include the library in your code:
import Textarea from 'react-native-textarea';
  • Use the component:
...
<View style={styles.container}>
  <Textarea
    containerStyle={styles.textareaContainer}
    style={styles.textarea}
    onChangeText={this.onChange}
    defaultValue={this.state.text}
    maxLength={120}
    placeholder={'好玩有趣的大家同乐伤感忧闷的大家同哭。。。'}
    placeholderTextColor={'#c7c7c7'}
    underlineColorAndroid={'transparent'}
  />
</View>
...

const styles = StyleSheet.create({
  container: {
    flex: 1,
    padding: 30,
    justifyContent: 'center',
    alignItems: 'center',
  },
  textareaContainer: {
    height: 180,
    padding: 5,
    backgroundColor: '#F5FCFF',
  },
  textarea: {
    textAlignVertical: 'top',  // hack android
    height: 170,
    fontSize: 14,
    color: '#333',
  },
});

API

Textarea

PropertiesDescritionTypeDefault
maxLengthlimits the maximum number of characters that can be enterednumber0
containerStylecustom styleObject-

More available Textarea API can be found at react-native TextInput

Keywords

textarea

FAQs

Package last updated on 29 Apr 2020

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