Installations
npm install react-native-element-textinput
Developer Guide
Typescript
Yes
Module System
CommonJS
Node Version
19.4.0
NPM Version
9.2.0
Score
44
Supply Chain
59.1
Quality
67
Maintenance
50
Vulnerability
93.6
License
Releases
Contributors
Unable to fetch Contributors
Languages
TypeScript (93.08%)
JavaScript (6.56%)
Shell (0.36%)
Developer
hoaphantn7604
Download Statistics
Total Downloads
32,270
Last Day
17
Last Week
159
Last Month
962
Last Year
10,680
GitHub Statistics
56 Stars
62 Commits
13 Forks
2 Watching
1 Branches
1 Contributors
Package Meta Information
Latest Version
2.2.0
Package Id
react-native-element-textinput@2.2.0
Unpacked Size
243.28 kB
Size
33.87 kB
File Count
96
NPM Version
9.2.0
Node Version
19.4.0
Publised On
18 Jan 2023
Total Downloads
Cumulative downloads
Total Downloads
32,270
Last day
-65.3%
17
Compared to previous day
Last week
-49.5%
159
Compared to previous week
Last month
-24.5%
962
Compared to previous month
Last year
-12.1%
10,680
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dependencies
1
Peer Dependencies
2
Dev Dependencies
19
react-native-element-textinput
A react-native TextInput, TagsInput and AutoComplete component easy to customize for both iOS and Android.
Features
- TextInput, TagsInput and AutoComplete in one package
- Easy to use
- Consistent look and feel on iOS and Android
- Customizable font size, colors and animation duration
- Implemented with typescript
Getting started
1 npm install react-native-element-textinput --save
or
1 yarn add react-native-element-textinput
Source code demo
- react-native-template-components A beautiful template for React Native.
Demo
TextInput extends TextInputProps
Props | Params | isRequire | default |
---|---|---|---|
mode | default or numeric or password | No | Switch mode textinput |
style | ViewStyle | No | Styling for container view |
label | String | No | Label for textinput |
labelStyle | TextStyle | No | Styling for label text |
placeholderStyle | TextStyle | No | Styling for placeholderStyle text |
inputStyle | TextStyle | No | Styling for input view |
textError | String | No | Text error |
textErrorStyle | TextStyle | No | Styling for text error |
showIcon | Boolean | No | Show or hide icon clear text |
iconStyle | ImageStyle | No | Styling for icon clear text |
focusColor | String | No | Color when focus to textinput |
fontFamily | String | No | Customize font style |
renderLeftIcon | () => JSX.Element | No | Customize left icon for textinput |
renderRightIcon | () => JSX.Element | No | Customize right icon for textinput |
HashtagInput extends TextInputProps
Props | Params | isRequire | default |
---|---|---|---|
style | ViewStyle | No | Styling for container view |
label | String | No | Label for textinput |
labelStyle | TextStyle | No | Styling for label text |
placeholderStyle | TextStyle | No | Styling for placeholderStyle text |
inputStyle | TextStyle | No | Styling for input view |
textError | String | No | Text error |
textErrorStyle | TextStyle | No | Styling for text error |
showIcon | Boolean | No | Show or hide icon clear text |
iconStyle | ImageStyle | No | Styling for icon clear text |
focusColor | String | No | Color when focus to textinput |
fontFamily | String | No | Customize font style |
renderLeftIcon | () => JSX.Element | No | Customize left icon for textinput |
renderRightIcon | () => JSX.Element | No | Customize right icon for textinput |
data | String[] | No | Data is a plain array |
hashtagStyle | ViewStyle | No | Styling for hashtash container view |
hashtagTextStyle | TextStyle | No | Styling for hashtag text |
onChangeValue | (string[]) => void | No | Callback that is called when submit value |
renderHashtagItem | (item, unSelect?: () => void) => JSX.Element | No | Takes an item from data and renders it into the list selected |
TagsInput extends TextInputProps
Props | Params | isRequire | default |
---|---|---|---|
style | ViewStyle | No | Styling for container view |
label | String | No | Label for textinput |
labelStyle | TextStyle | No | Styling for label text |
placeholderStyle | TextStyle | No | Styling for placeholderStyle text |
inputStyle | TextStyle | No | Styling for input view |
textError | String | No | Text error |
textErrorStyle | TextStyle | No | Styling for text error |
showIcon | Boolean | No | Show or hide icon clear text |
iconStyle | ImageStyle | No | Styling for icon clear text |
focusColor | String | No | Color when focus to textinput |
fontFamily | String | No | Customize font style |
renderLeftIcon | () => JSX.Element | No | Customize left icon for textinput |
renderRightIcon | () => JSX.Element | No | Customize right icon for textinput |
data | String[] | No | Data is a plain array |
tagsStyle | ViewStyle | No | Styling for hashtash container view |
tagsTextStyle | TextStyle | No | Styling for hashtag text |
onChangeValue | (string[]) => void | No | Callback that is called when submit value |
renderTagsItem | (item, unSelect?: () => void) => JSX.Element | No | Takes an item from data and renders it into the list selected |
AutoComplete extends TextInputProps
Props | Params | isRequire | default |
---|---|---|---|
data | String[] | No | Data is a plain array |
style | ViewStyle | No | Styling for container view |
label | String | No | Label for textinput |
labelStyle | TextStyle | No | Styling for label text |
placeholderStyle | TextStyle | No | Styling for placeholderStyle text |
inputStyle | TextStyle | No | Styling for input view |
textError | String | No | Text error |
textErrorStyle | TextStyle | No | Styling for text error |
showIcon | Boolean | No | Show or hide icon clear text |
iconStyle | ImageStyle | No | Styling for icon clear text |
focusColor | String | No | Color when focus to textinput |
fontFamily | String | No | Customize font style |
renderLeftIcon | () => JSX.Element | No | Customize left icon for textinput |
renderRightIcon | () => JSX.Element | No | Customize right icon for textinput |
renderItem | (item:string) => JSX.Element | No | Takes an item from data and renders it into the list |
Example 1
1 import React, { useState } from 'react'; 2 import { StyleSheet, View } from 'react-native'; 3 import { TextInput } from 'react-native-element-textinput'; 4 5 const TextInputComponent = () => { 6 const [value, setValue] = useState(''); 7 8 return ( 9 <View style={styles.container}> 10 <TextInput 11 value={value} 12 style={styles.input} 13 inputStyle={styles.inputStyle} 14 labelStyle={styles.labelStyle} 15 placeholderStyle={styles.placeholderStyle} 16 textErrorStyle={styles.textErrorStyle} 17 label="TextInput" 18 placeholder="Placeholder" 19 placeholderTextColor="gray" 20 focusColor="blue" 21 onChangeText={text => { 22 setValue(text); 23 }} 24 /> 25 </View> 26 ); 27 }; 28 29 export default TextInputComponent; 30 31 const styles = StyleSheet.create({ 32 container: { 33 padding: 16, 34 }, 35 input: { 36 height: 55, 37 paddingHorizontal: 12, 38 borderRadius: 8, 39 borderWidth: 0.5, 40 borderColor: '#DDDDDD', 41 }, 42 inputStyle: { fontSize: 16 }, 43 labelStyle: { 44 fontSize: 14, 45 position: 'absolute', 46 top: -10, 47 backgroundColor: 'white', 48 paddingHorizontal: 4, 49 marginLeft: -4, 50 }, 51 placeholderStyle: { fontSize: 16 }, 52 textErrorStyle: { fontSize: 16 }, 53 });
Example 2
1 import React, { useState } from 'react'; 2 import { StyleSheet, View } from 'react-native'; 3 import { TextInput } from 'react-native-element-textinput'; 4 5 const TextInputComponent = () => { 6 const [value, setValue] = useState(''); 7 8 return ( 9 <View style={styles.container}> 10 <TextInput 11 value={value} 12 style={styles.input} 13 inputStyle={styles.inputStyle} 14 labelStyle={styles.labelStyle} 15 placeholderStyle={styles.placeholderStyle} 16 textErrorStyle={styles.textErrorStyle} 17 label="TextInput" 18 placeholder="Placeholder" 19 placeholderTextColor="gray" 20 onChangeText={text => { 21 setValue(text); 22 }} 23 /> 24 </View> 25 ); 26 }; 27 28 export default TextInputComponent; 29 30 const styles = StyleSheet.create({ 31 container: { 32 padding: 16, 33 }, 34 input: { 35 height: 55, 36 paddingHorizontal: 12, 37 borderRadius: 8, 38 backgroundColor: 'white', 39 shadowColor: '#000', 40 shadowOffset: { 41 width: 0, 42 height: 1, 43 }, 44 shadowOpacity: 0.2, 45 shadowRadius: 1.41, 46 elevation: 2, 47 }, 48 inputStyle: { fontSize: 16 }, 49 labelStyle: { fontSize: 14 }, 50 placeholderStyle: { fontSize: 16 }, 51 textErrorStyle: { fontSize: 16 }, 52 });
Example 3
1 import React, { useState } from 'react'; 2 import { StyleSheet, View } from 'react-native'; 3 import { TextInput } from 'react-native-element-textinput'; 4 5 const TextInputComponent = () => { 6 const [value, setValue] = useState(''); 7 8 return ( 9 <View style={styles.container}> 10 <TextInput 11 mode="password" 12 value={value} 13 style={styles.input} 14 inputStyle={styles.inputStyle} 15 labelStyle={styles.labelStyle} 16 placeholderStyle={styles.placeholderStyle} 17 textErrorStyle={styles.textErrorStyle} 18 label="Password" 19 placeholder="Placeholder" 20 placeholderTextColor="gray" 21 onChangeText={text => { 22 setValue(text); 23 }} 24 /> 25 </View> 26 ); 27 }; 28 29 export default TextInputComponent; 30 31 const styles = StyleSheet.create({ 32 container: { 33 padding: 16, 34 }, 35 input: { 36 height: 55, 37 paddingHorizontal: 12, 38 borderRadius: 8, 39 backgroundColor: 'white', 40 shadowColor: '#000', 41 shadowOffset: { 42 width: 0, 43 height: 1, 44 }, 45 shadowOpacity: 0.2, 46 shadowRadius: 1.41, 47 elevation: 2, 48 }, 49 inputStyle: { fontSize: 16 }, 50 labelStyle: { fontSize: 14 }, 51 placeholderStyle: { fontSize: 16 }, 52 textErrorStyle: { fontSize: 16 }, 53 });
Example 4
1 import React, { useState } from 'react'; 2 import { StyleSheet, View } from 'react-native'; 3 import { HashtagInput } from 'react-native-element-textinput'; 4 5 const TextInputComponent = () => { 6 const [value, setValue] = useState<string[]>([]); 7 8 return ( 9 <View style={styles.container}> 10 <HashtagInput 11 data={value} 12 style={styles.input} 13 inputStyle={styles.inputStyle} 14 labelStyle={styles.labelStyle} 15 placeholderStyle={styles.placeholderStyle} 16 textErrorStyle={styles.textErrorStyle} 17 hashtagStyle={styles.hashtagStyle} 18 hashtagTextStyle={styles.hashtagTextStyle} 19 placeholder="Hashtag..." 20 placeholderTextColor="gray" 21 onChangeValue={value => { 22 setValue(value); 23 }} 24 /> 25 </View> 26 ); 27 }; 28 29 export default TextInputComponent; 30 31 const styles = StyleSheet.create({ 32 container: { 33 padding: 16, 34 }, 35 input: { 36 height: 55, 37 paddingHorizontal: 12, 38 borderRadius: 8, 39 backgroundColor: 'white', 40 shadowColor: '#000', 41 shadowOffset: { 42 width: 0, 43 height: 1, 44 }, 45 shadowOpacity: 0.2, 46 shadowRadius: 1.41, 47 elevation: 2, 48 }, 49 inputStyle: { fontSize: 16 }, 50 labelStyle: { fontSize: 14 }, 51 placeholderStyle: { fontSize: 16 }, 52 textErrorStyle: { fontSize: 16 }, 53 hashtagStyle: { 54 borderWidth: 0, 55 borderRadius: 16, 56 padding: 8, 57 backgroundColor: 'white', 58 shadowColor: '#000', 59 shadowOffset: { 60 width: 0, 61 height: 1, 62 }, 63 shadowOpacity: 0.2, 64 shadowRadius: 1.41, 65 elevation: 2, 66 }, 67 hashtagTextStyle: { 68 fontSize: 16, 69 }, 70 });
Example 5
1 import React, { useState } from 'react'; 2 import { StyleSheet, View } from 'react-native'; 3 import { TagsInput } from 'react-native-element-textinput'; 4 5 const TextInputComponent = () => { 6 const [value, setValue] = useState([]); 7 8 return ( 9 <View style={styles.container}> 10 <TagsInput 11 data={value} 12 style={styles.input} 13 inputStyle={styles.inputStyle} 14 labelStyle={styles.labelStyle} 15 placeholderStyle={styles.placeholderStyle} 16 textErrorStyle={styles.textErrorStyle} 17 tagsStyle={styles.tagsStyle} 18 tagsTextStyle={styles.tagsTextStyle} 19 label="TagsInput" 20 placeholder="Tags..." 21 placeholderTextColor="gray" 22 onChangeValue={value => { 23 setValue(value); 24 }} 25 /> 26 </View> 27 ); 28 }; 29 30 export default TextInputComponent; 31 32 const styles = StyleSheet.create({ 33 container: { 34 padding: 16, 35 }, 36 input: { 37 paddingHorizontal: 12, 38 borderRadius: 8, 39 backgroundColor: 'white', 40 shadowColor: '#000', 41 shadowOffset: { 42 width: 0, 43 height: 1, 44 }, 45 shadowOpacity: 0.2, 46 shadowRadius: 1.41, 47 elevation: 2, 48 }, 49 inputStyle: { 50 fontSize: 16, 51 minWidth: 80, 52 }, 53 labelStyle: { 54 fontSize: 14, 55 position: 'absolute', 56 top: -10, 57 backgroundColor: 'white', 58 paddingHorizontal: 4, 59 marginLeft: -4, 60 }, 61 placeholderStyle: { fontSize: 16 }, 62 textErrorStyle: { fontSize: 16 }, 63 tagsStyle: { 64 borderWidth: 0, 65 borderRadius: 16, 66 padding: 8, 67 backgroundColor: 'white', 68 shadowColor: '#000', 69 shadowOffset: { 70 width: 0, 71 height: 1, 72 }, 73 shadowOpacity: 0.2, 74 shadowRadius: 1.41, 75 elevation: 2, 76 }, 77 tagsTextStyle: { 78 fontSize: 16, 79 }, 80 });
Example 6
1 import React, { useState } from 'react'; 2 import { StyleSheet, View } from 'react-native'; 3 import { AutoComplete } from 'react-native-element-textinput'; 4 5 const TextInputComponent = () => { 6 const [value, setValue] = useState(''); 7 8 return ( 9 <View style={styles.container}> 10 <AutoComplete 11 value={value} 12 data={['hello', 'how are you', 'complete']} 13 style={styles.input} 14 inputStyle={styles.inputStyle} 15 labelStyle={styles.labelStyle} 16 placeholderStyle={styles.placeholderStyle} 17 textErrorStyle={styles.textErrorStyle} 18 label="Auto Complete" 19 placeholder="Placeholder..." 20 placeholderTextColor="gray" 21 onChangeText={e => { 22 setValue(e); 23 }} 24 /> 25 </View> 26 ); 27 }; 28 29 export default TextInputComponent; 30 31 const styles = StyleSheet.create({ 32 container: { 33 padding: 16, 34 }, 35 input: { 36 height: 55, 37 paddingHorizontal: 12, 38 borderRadius: 8, 39 backgroundColor: 'white', 40 shadowColor: '#000', 41 shadowOffset: { 42 width: 0, 43 height: 1, 44 }, 45 shadowOpacity: 0.2, 46 shadowRadius: 1.41, 47 elevation: 2, 48 }, 49 inputStyle: { fontSize: 16 }, 50 labelStyle: { fontSize: 14 }, 51 placeholderStyle: { fontSize: 16 }, 52 textErrorStyle: { fontSize: 16 }, 53 });
My Channel ✨
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
no SAST tool detected
Details
- Warn: no pull requests merged into dev branch
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
94 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92
- Warn: Project is vulnerable to: GHSA-c2jc-4fpr-4vhg
- Warn: Project is vulnerable to: GHSA-crh6-fp67-6883
- Warn: Project is vulnerable to: GHSA-v88g-cgmw-v5xw
- Warn: Project is vulnerable to: GHSA-whgm-jr23-g3j9
- Warn: Project is vulnerable to: GHSA-cph5-m8f7-6c5x
- Warn: Project is vulnerable to: GHSA-wf5p-g6vw-rhxx
- Warn: Project is vulnerable to: GHSA-qwcr-r2fm-qrc7
- Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg
- Warn: Project is vulnerable to: GHSA-x9w5-v3q2-3rhw
- Warn: Project is vulnerable to: GHSA-w8qv-6jwh-64r5
- Warn: Project is vulnerable to: GHSA-pxg6-pf52-xh8x
- Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275
- Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq
- Warn: Project is vulnerable to: GHSA-434g-2637-qmqr
- Warn: Project is vulnerable to: GHSA-49q7-c7j4-3p7m
- Warn: Project is vulnerable to: GHSA-977x-g7h5-7qgw
- Warn: Project is vulnerable to: GHSA-f7q4-pwc6-w24p
- Warn: Project is vulnerable to: GHSA-fc9h-whq2-v747
- Warn: Project is vulnerable to: GHSA-rv95-896h-c2vc
- Warn: Project is vulnerable to: GHSA-qw6h-vgh9-j6wx
- Warn: Project is vulnerable to: GHSA-jchw-25xp-jwwc
- Warn: Project is vulnerable to: GHSA-cxjh-pqwp-8mfp
- Warn: Project is vulnerable to: GHSA-pfrx-2q88-qq97
- Warn: Project is vulnerable to: GHSA-f5x2-xv93-4p23
- Warn: Project is vulnerable to: GHSA-gmpm-xp43-f7g6
- Warn: Project is vulnerable to: GHSA-pf27-929j-9pmm
- Warn: Project is vulnerable to: GHSA-327c-qx3v-h673
- Warn: Project is vulnerable to: GHSA-x4cf-6jr3-3qvp
- Warn: Project is vulnerable to: GHSA-mph8-6787-r8hw
- Warn: Project is vulnerable to: GHSA-7mhc-prgv-r3q4
- Warn: Project is vulnerable to: GHSA-rc47-6667-2j5j
- Warn: Project is vulnerable to: GHSA-c7qv-q95q-8v27
- Warn: Project is vulnerable to: GHSA-33f9-j839-rf8h
- Warn: Project is vulnerable to: GHSA-c36v-fmgq-m8hx
- Warn: Project is vulnerable to: GHSA-78xj-cgh5-2h22
- Warn: Project is vulnerable to: GHSA-2p57-rm9w-gvfp
- Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h
- Warn: Project is vulnerable to: GHSA-76p3-8jx3-jpfq
- Warn: Project is vulnerable to: GHSA-3rfm-jhwj-7488
- Warn: Project is vulnerable to: GHSA-hhq3-ff78-jv3g
- Warn: Project is vulnerable to: GHSA-p6mc-m468-83gw
- Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm
- Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv
- Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3
- Warn: Project is vulnerable to: GHSA-r683-j2x4-v87g
- Warn: Project is vulnerable to: GHSA-5rrq-pxf6-6jx5
- Warn: Project is vulnerable to: GHSA-8fr3-hfg3-gpgp
- Warn: Project is vulnerable to: GHSA-gf8q-jrpm-jvxq
- Warn: Project is vulnerable to: GHSA-2r2c-g63r-vccr
- Warn: Project is vulnerable to: GHSA-cfm4-qjh2-4765
- Warn: Project is vulnerable to: GHSA-x4jg-mjrx-434g
- Warn: Project is vulnerable to: GHSA-rp65-9cf3-cjxr
- Warn: Project is vulnerable to: GHSA-9wv6-86v2-598j
- Warn: Project is vulnerable to: GHSA-rhx6-c78j-4q9w
- Warn: Project is vulnerable to: GHSA-7fh5-64p2-3v2j
- Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp
- Warn: Project is vulnerable to: GHSA-rxrc-rgv4-jpvx
- Warn: Project is vulnerable to: GHSA-7f53-fmmv-mfjv
- Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6
- Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw
- Warn: Project is vulnerable to: GHSA-m6fv-jmcg-4jfg
- Warn: Project is vulnerable to: GHSA-cm22-4g7w-348p
- Warn: Project is vulnerable to: GHSA-g4rg-993r-mgx7
- Warn: Project is vulnerable to: GHSA-3jfq-g458-7qm9
- Warn: Project is vulnerable to: GHSA-r628-mhmh-qjhw
- Warn: Project is vulnerable to: GHSA-9r2w-394v-53qc
- Warn: Project is vulnerable to: GHSA-5955-9wpr-37jh
- Warn: Project is vulnerable to: GHSA-qq89-hq3f-393p
- Warn: Project is vulnerable to: GHSA-f5x3-32g6-xq36
- Warn: Project is vulnerable to: GHSA-4wf5-vphf-c2xc
- Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3
- Warn: Project is vulnerable to: GHSA-fhg7-m89q-25r3
- Warn: Project is vulnerable to: GHSA-wr3j-pwj9-hqq6
- Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q
- Warn: Project is vulnerable to: GHSA-776f-qx25-q3cc
- Warn: Project is vulnerable to: GHSA-5fg8-2547-mr8q
- Warn: Project is vulnerable to: GHSA-3j8f-xvm3-ffx4
- Warn: Project is vulnerable to: GHSA-4p35-cfcx-8653
- Warn: Project is vulnerable to: GHSA-7f3x-x4pr-wqhj
- Warn: Project is vulnerable to: GHSA-jpp7-7chh-cf67
- Warn: Project is vulnerable to: GHSA-q6wq-5p59-983w
- Warn: Project is vulnerable to: GHSA-j9fq-vwqv-2fm2
- Warn: Project is vulnerable to: GHSA-pqw5-jmp5-px4v
- Warn: Project is vulnerable to: GHSA-4w2j-2rg4-5mjw
- Warn: Project is vulnerable to: GHSA-mrgp-mrhc-5jrq
- Warn: Project is vulnerable to: GHSA-7jxr-cg7f-gpgv
- Warn: Project is vulnerable to: GHSA-xj72-wvfv-8985
- Warn: Project is vulnerable to: GHSA-ch3r-j5x3-6q2m
- Warn: Project is vulnerable to: GHSA-p5gc-c584-jj6v
- Warn: Project is vulnerable to: GHSA-whpj-8f3w-67p5
- Warn: Project is vulnerable to: GHSA-cchq-frgv-rjh5
- Warn: Project is vulnerable to: GHSA-g644-9gfx-q4q4
- Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7
Score
2
/10
Last Scanned on 2024-12-16
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More