{"id":21768307,"url":"https://github.com/hoaphantn7604/react-native-element-textinput","last_synced_at":"2025-09-09T06:13:10.672Z","repository":{"id":42161175,"uuid":"382282428","full_name":"hoaphantn7604/react-native-element-textinput","owner":"hoaphantn7604","description":"A react-native TextInput, TagsInput and AutoComplete component easy to customize for both iOS and Android.","archived":false,"fork":false,"pushed_at":"2023-03-24T04:14:27.000Z","size":1920,"stargazers_count":58,"open_issues_count":11,"forks_count":13,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-27T06:34:44.958Z","etag":null,"topics":["autocomplete","components","elements","hashtag","input","material","react-native","tags","textfield","textinput"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hoaphantn7604.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-07-02T08:31:48.000Z","updated_at":"2025-02-11T15:51:22.000Z","dependencies_parsed_at":"2024-06-20T22:02:45.924Z","dependency_job_id":"bfe01586-1bf2-4805-8802-9db9966f4b0c","html_url":"https://github.com/hoaphantn7604/react-native-element-textinput","commit_stats":{"total_commits":61,"total_committers":6,"mean_commits":"10.166666666666666","dds":"0.39344262295081966","last_synced_commit":"ac4d4da289861da7220c138a0560f7a9a71afbcb"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hoaphantn7604%2Freact-native-element-textinput","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hoaphantn7604%2Freact-native-element-textinput/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hoaphantn7604%2Freact-native-element-textinput/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hoaphantn7604%2Freact-native-element-textinput/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hoaphantn7604","download_url":"https://codeload.github.com/hoaphantn7604/react-native-element-textinput/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248381759,"owners_count":21094525,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["autocomplete","components","elements","hashtag","input","material","react-native","tags","textfield","textinput"],"created_at":"2024-11-26T13:35:27.641Z","updated_at":"2025-04-13T15:41:32.552Z","avatar_url":"https://github.com/hoaphantn7604.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-native-element-textinput\nA react-native TextInput, TagsInput and AutoComplete component easy to customize for both iOS and Android.\n\n## Features\n* TextInput, TagsInput and AutoComplete in one package\n* Easy to use\n* Consistent look and feel on iOS and Android\n* Customizable font size, colors and animation duration\n* Implemented with typescript\n\n## Getting started\n```js\n    npm install react-native-element-textinput --save\n```\nor\n\n```js\n    yarn add react-native-element-textinput\n```\n\n#### Source code demo\n- [react-native-template-components](https://github.com/hoaphantn7604/react-native-template-components) A beautiful template for React Native.\n\n### Demo\n![](https://github.com/hoaphantn7604/file-upload/blob/master/document/textinput/demo.png)\n\n#### TextInput extends TextInputProps\n| Props              | Params               | isRequire | default                            |\n| ------------------ | -------------------- | --------- | ---------------------------------- |\n| mode     | default or numeric or password |No         | Switch mode textinput              |\n| style              | ViewStyle            | No        | Styling for container view         |\n| label              | String               | No        | Label for textinput                |\n| labelStyle         | TextStyle            | No        | Styling for label text             |\n| placeholderStyle   | TextStyle            | No        | Styling for placeholderStyle text  |\n| inputStyle         | TextStyle            | No        | Styling for input view             |\n| textError          | String               | No        | Text error                         |\n| textErrorStyle     | TextStyle            | No        | Styling for text error             |\n| showIcon           | Boolean              | No        | Show or hide icon clear text       |\n| iconStyle          | ImageStyle           | No        | Styling for icon clear text        |\n| focusColor         | String               | No        | Color when focus to textinput      |\n| fontFamily         | String               | No        | Customize font style               |\n| renderLeftIcon     | () =\u003e JSX.Element    | No        | Customize left icon for textinput  |\n| renderRightIcon    | () =\u003e JSX.Element    | No        | Customize right icon for textinput |\n\n#### HashtagInput extends TextInputProps\n| Props              | Params               | isRequire | default                            |\n| ------------------ | -------------------- | --------- | ---------------------------------- |\n| style              | ViewStyle            | No        | Styling for container view         |\n| label              | String               | No        | Label for textinput                |\n| labelStyle         | TextStyle            | No        | Styling for label text             |\n| placeholderStyle   | TextStyle            | No        | Styling for placeholderStyle text  |\n| inputStyle         | TextStyle            | No        | Styling for input view             |\n| textError          | String               | No        | Text error                         |\n| textErrorStyle     | TextStyle            | No        | Styling for text error             |\n| showIcon           | Boolean              | No        | Show or hide icon clear text       |\n| iconStyle          | ImageStyle           | No        | Styling for icon clear text        |\n| focusColor         | String               | No        | Color when focus to textinput      |\n| fontFamily         | String               | No        | Customize font style               |\n| renderLeftIcon     | () =\u003e JSX.Element    | No        | Customize left icon for textinput  |\n| renderRightIcon    | () =\u003e JSX.Element    | No        | Customize right icon for textinput |\n| data               | String[]             | No        | Data is a plain array              |\n| hashtagStyle       | ViewStyle            | No        | Styling for hashtash container view|\n| hashtagTextStyle   | TextStyle            | No        | Styling for hashtag text           |\n| onChangeValue      | (string[]) =\u003e void   | No        | Callback that is called when submit value |\n| renderHashtagItem  | (item, unSelect?: () =\u003e void) =\u003e JSX.Element     | No        | Takes an item from data and renders it into the list selected       |\n\n#### TagsInput extends TextInputProps\n| Props              | Params               | isRequire | default                            |\n| ------------------ | -------------------- | --------- | ---------------------------------- |\n| style              | ViewStyle            | No        | Styling for container view         |\n| label              | String               | No        | Label for textinput                |\n| labelStyle         | TextStyle            | No        | Styling for label text             |\n| placeholderStyle   | TextStyle            | No        | Styling for placeholderStyle text  |\n| inputStyle         | TextStyle            | No        | Styling for input view             |\n| textError          | String               | No        | Text error                         |\n| textErrorStyle     | TextStyle            | No        | Styling for text error             |\n| showIcon           | Boolean              | No        | Show or hide icon clear text       |\n| iconStyle          | ImageStyle           | No        | Styling for icon clear text        |\n| focusColor         | String               | No        | Color when focus to textinput      |\n| fontFamily         | String               | No        | Customize font style               |\n| renderLeftIcon     | () =\u003e JSX.Element    | No        | Customize left icon for textinput  |\n| renderRightIcon    | () =\u003e JSX.Element    | No        | Customize right icon for textinput |\n| data               | String[]             | No        | Data is a plain array              |\n| tagsStyle          | ViewStyle            | No        | Styling for hashtash container view|\n| tagsTextStyle   | TextStyle            | No        | Styling for hashtag text           |\n| onChangeValue      | (string[]) =\u003e void   | No        | Callback that is called when submit value |\n| renderTagsItem     | (item, unSelect?: () =\u003e void) =\u003e JSX.Element     | No        | Takes an item from data and renders it into the list selected  |\n\n\n\n\n#### AutoComplete extends TextInputProps\n| Props              | Params                       | isRequire | default                            |\n| ------------------ | -----------------------------| --------- | ---------------------------------- |\n| data               | String[]                     | No        | Data is a plain array              |\n| style              | ViewStyle                    | No        | Styling for container view         |\n| label              | String                       | No        | Label for textinput                |\n| labelStyle         | TextStyle                    | No        | Styling for label text             |\n| placeholderStyle   | TextStyle                    | No        | Styling for placeholderStyle text  |\n| inputStyle         | TextStyle                    | No        | Styling for input view             |\n| textError          | String                       | No        | Text error                         |\n| textErrorStyle     | TextStyle                    | No        | Styling for text error             |\n| showIcon           | Boolean                      | No        | Show or hide icon clear text       |\n| iconStyle          | ImageStyle                   | No        | Styling for icon clear text        |\n| focusColor         | String                       | No        | Color when focus to textinput      |\n| fontFamily         | String                       | No        | Customize font style               |\n| renderLeftIcon     | () =\u003e JSX.Element            | No        | Customize left icon for textinput  |\n| renderRightIcon    | () =\u003e JSX.Element            | No        | Customize right icon for textinput |\n| renderItem         | (item:string) =\u003e JSX.Element | No        | Takes an item from data and renders it into the list |\n\n\n### Example 1\n![](https://github.com/hoaphantn7604/file-upload/blob/master/document/textinput/example1.png)\n```js\n  import React, { useState } from 'react';\n  import { StyleSheet, View } from 'react-native';\n  import { TextInput } from 'react-native-element-textinput';\n\n  const TextInputComponent = () =\u003e {\n    const [value, setValue] = useState('');\n\n    return (\n      \u003cView style={styles.container}\u003e\n        \u003cTextInput\n          value={value}\n          style={styles.input}\n          inputStyle={styles.inputStyle}\n          labelStyle={styles.labelStyle}\n          placeholderStyle={styles.placeholderStyle}\n          textErrorStyle={styles.textErrorStyle}\n          label=\"TextInput\"\n          placeholder=\"Placeholder\"\n          placeholderTextColor=\"gray\"\n          focusColor=\"blue\"\n          onChangeText={text =\u003e {\n            setValue(text);\n          }}\n        /\u003e\n      \u003c/View\u003e\n    );\n  };\n\n  export default TextInputComponent;\n\n  const styles = StyleSheet.create({\n    container: {\n      padding: 16,\n    },\n    input: {\n      height: 55,\n      paddingHorizontal: 12,\n      borderRadius: 8,\n      borderWidth: 0.5,\n      borderColor: '#DDDDDD',\n    },\n    inputStyle: { fontSize: 16 },\n    labelStyle: {\n      fontSize: 14,\n      position: 'absolute',\n      top: -10,\n      backgroundColor: 'white',\n      paddingHorizontal: 4,\n      marginLeft: -4,\n    },\n    placeholderStyle: { fontSize: 16 },\n    textErrorStyle: { fontSize: 16 },\n  });\n```\n\n### Example 2\n![](https://github.com/hoaphantn7604/file-upload/blob/master/document/textinput/example2.png)\n```js\n  import React, { useState } from 'react';\n  import { StyleSheet, View } from 'react-native';\n  import { TextInput } from 'react-native-element-textinput';\n\n  const TextInputComponent = () =\u003e {\n    const [value, setValue] = useState('');\n\n    return (\n      \u003cView style={styles.container}\u003e\n        \u003cTextInput\n          value={value}\n          style={styles.input}\n          inputStyle={styles.inputStyle}\n          labelStyle={styles.labelStyle}\n          placeholderStyle={styles.placeholderStyle}\n          textErrorStyle={styles.textErrorStyle}\n          label=\"TextInput\"\n          placeholder=\"Placeholder\"\n          placeholderTextColor=\"gray\"\n          onChangeText={text =\u003e {\n            setValue(text);\n          }}\n        /\u003e\n      \u003c/View\u003e\n    );\n  };\n\n  export default TextInputComponent;\n\n  const styles = StyleSheet.create({\n    container: {\n      padding: 16,\n    },\n    input: {\n      height: 55,\n      paddingHorizontal: 12,\n      borderRadius: 8,\n      backgroundColor: 'white',\n      shadowColor: '#000',\n      shadowOffset: {\n        width: 0,\n        height: 1,\n      },\n      shadowOpacity: 0.2,\n      shadowRadius: 1.41,\n      elevation: 2,\n    },\n    inputStyle: { fontSize: 16 },\n    labelStyle: { fontSize: 14 },\n    placeholderStyle: { fontSize: 16 },\n    textErrorStyle: { fontSize: 16 },\n  });\n```\n\n### Example 3\n![](https://github.com/hoaphantn7604/file-upload/blob/master/document/textinput/example3.png)\n```js\n  import React, { useState } from 'react';\n  import { StyleSheet, View } from 'react-native';\n  import { TextInput } from 'react-native-element-textinput';\n\n  const TextInputComponent = () =\u003e {\n    const [value, setValue] = useState('');\n\n    return (\n      \u003cView style={styles.container}\u003e\n        \u003cTextInput\n          mode=\"password\"\n          value={value}\n          style={styles.input}\n          inputStyle={styles.inputStyle}\n          labelStyle={styles.labelStyle}\n          placeholderStyle={styles.placeholderStyle}\n          textErrorStyle={styles.textErrorStyle}\n          label=\"Password\"\n          placeholder=\"Placeholder\"\n          placeholderTextColor=\"gray\"\n          onChangeText={text =\u003e {\n            setValue(text);\n          }}\n        /\u003e\n      \u003c/View\u003e\n    );\n  };\n\n  export default TextInputComponent;\n\n  const styles = StyleSheet.create({\n    container: {\n      padding: 16,\n    },\n    input: {\n      height: 55,\n      paddingHorizontal: 12,\n      borderRadius: 8,\n      backgroundColor: 'white',\n      shadowColor: '#000',\n      shadowOffset: {\n        width: 0,\n        height: 1,\n      },\n      shadowOpacity: 0.2,\n      shadowRadius: 1.41,\n      elevation: 2,\n    },\n    inputStyle: { fontSize: 16 },\n    labelStyle: { fontSize: 14 },\n    placeholderStyle: { fontSize: 16 },\n    textErrorStyle: { fontSize: 16 },\n  });\n```\n\n### Example 4\n![](https://github.com/hoaphantn7604/file-upload/blob/master/document/textinput/example4.png)\n```js\n  import React, { useState } from 'react';\n  import { StyleSheet, View } from 'react-native';\n  import { HashtagInput } from 'react-native-element-textinput';\n\n  const TextInputComponent = () =\u003e {\n    const [value, setValue] = useState\u003cstring[]\u003e([]);\n\n    return (\n      \u003cView style={styles.container}\u003e\n        \u003cHashtagInput\n          data={value}\n          style={styles.input}\n          inputStyle={styles.inputStyle}\n          labelStyle={styles.labelStyle}\n          placeholderStyle={styles.placeholderStyle}\n          textErrorStyle={styles.textErrorStyle}\n          hashtagStyle={styles.hashtagStyle}\n          hashtagTextStyle={styles.hashtagTextStyle}\n          placeholder=\"Hashtag...\"\n          placeholderTextColor=\"gray\"\n          onChangeValue={value =\u003e {\n            setValue(value);\n          }}\n        /\u003e\n      \u003c/View\u003e\n    );\n  };\n\n  export default TextInputComponent;\n\n  const styles = StyleSheet.create({\n    container: {\n      padding: 16,\n    },\n    input: {\n      height: 55,\n      paddingHorizontal: 12,\n      borderRadius: 8,\n      backgroundColor: 'white',\n      shadowColor: '#000',\n      shadowOffset: {\n        width: 0,\n        height: 1,\n      },\n      shadowOpacity: 0.2,\n      shadowRadius: 1.41,\n      elevation: 2,\n    },\n    inputStyle: { fontSize: 16 },\n    labelStyle: { fontSize: 14 },\n    placeholderStyle: { fontSize: 16 },\n    textErrorStyle: { fontSize: 16 },\n    hashtagStyle: {\n      borderWidth: 0,\n      borderRadius: 16,\n      padding: 8,\n      backgroundColor: 'white',\n      shadowColor: '#000',\n      shadowOffset: {\n        width: 0,\n        height: 1,\n      },\n      shadowOpacity: 0.2,\n      shadowRadius: 1.41,\n      elevation: 2,\n    },\n    hashtagTextStyle: {\n      fontSize: 16,\n    },\n  });\n```\n\n### Example 5\n![](https://github.com/hoaphantn7604/file-upload/blob/master/document/textinput/example5.png)\n```js\n  import React, { useState } from 'react';\n  import { StyleSheet, View } from 'react-native';\n  import { TagsInput } from 'react-native-element-textinput';\n\n  const TextInputComponent = () =\u003e {\n    const [value, setValue] = useState([]);\n\n    return (\n      \u003cView style={styles.container}\u003e\n        \u003cTagsInput\n          data={value}\n          style={styles.input}\n          inputStyle={styles.inputStyle}\n          labelStyle={styles.labelStyle}\n          placeholderStyle={styles.placeholderStyle}\n          textErrorStyle={styles.textErrorStyle}\n          tagsStyle={styles.tagsStyle}\n          tagsTextStyle={styles.tagsTextStyle}\n          label=\"TagsInput\"\n          placeholder=\"Tags...\"\n          placeholderTextColor=\"gray\"\n          onChangeValue={value =\u003e {\n            setValue(value);\n          }}\n        /\u003e\n      \u003c/View\u003e\n    );\n  };\n\n  export default TextInputComponent;\n\n  const styles = StyleSheet.create({\n    container: {\n      padding: 16,\n    },\n    input: {\n      paddingHorizontal: 12,\n      borderRadius: 8,\n      backgroundColor: 'white',\n      shadowColor: '#000',\n      shadowOffset: {\n        width: 0,\n        height: 1,\n      },\n      shadowOpacity: 0.2,\n      shadowRadius: 1.41,\n      elevation: 2,\n    },\n    inputStyle: {\n      fontSize: 16,\n      minWidth: 80,\n    },\n    labelStyle: {\n      fontSize: 14,\n      position: 'absolute',\n      top: -10,\n      backgroundColor: 'white',\n      paddingHorizontal: 4,\n      marginLeft: -4,\n    },\n    placeholderStyle: { fontSize: 16 },\n    textErrorStyle: { fontSize: 16 },\n    tagsStyle: {\n      borderWidth: 0,\n      borderRadius: 16,\n      padding: 8,\n      backgroundColor: 'white',\n      shadowColor: '#000',\n      shadowOffset: {\n        width: 0,\n        height: 1,\n      },\n      shadowOpacity: 0.2,\n      shadowRadius: 1.41,\n      elevation: 2,\n    },\n    tagsTextStyle: {\n      fontSize: 16,\n    },\n  });\n```\n\n### Example 6\n![](https://github.com/hoaphantn7604/file-upload/blob/master/document/textinput/example6.png)\n```js\n  import React, { useState } from 'react';\n  import { StyleSheet, View } from 'react-native';\n  import { AutoComplete } from 'react-native-element-textinput';\n\n  const TextInputComponent = () =\u003e {\n    const [value, setValue] = useState('');\n\n    return (\n      \u003cView style={styles.container}\u003e\n        \u003cAutoComplete\n          value={value}\n          data={['hello', 'how are you', 'complete']}\n          style={styles.input}\n          inputStyle={styles.inputStyle}\n          labelStyle={styles.labelStyle}\n          placeholderStyle={styles.placeholderStyle}\n          textErrorStyle={styles.textErrorStyle}\n          label=\"Auto Complete\"\n          placeholder=\"Placeholder...\"\n          placeholderTextColor=\"gray\"\n          onChangeText={e =\u003e {\n            setValue(e);\n          }}\n        /\u003e\n      \u003c/View\u003e\n    );\n  };\n\n  export default TextInputComponent;\n\n  const styles = StyleSheet.create({\n    container: {\n      padding: 16,\n    },\n    input: {\n      height: 55,\n      paddingHorizontal: 12,\n      borderRadius: 8,\n      backgroundColor: 'white',\n      shadowColor: '#000',\n      shadowOffset: {\n        width: 0,\n        height: 1,\n      },\n      shadowOpacity: 0.2,\n      shadowRadius: 1.41,\n      elevation: 2,\n    },\n    inputStyle: { fontSize: 16 },\n    labelStyle: { fontSize: 14 },\n    placeholderStyle: { fontSize: 16 },\n    textErrorStyle: { fontSize: 16 },\n  });\n```\n\n[\u003cimg src=\"https://github.com/hoaphantn7604/file-upload/blob/master/document/profile/hoa_phan_dev_banner.png\"\u003e](https://www.youtube.com/channel/UCemCdKGzUgbfsLeGFOvbVEw?sub_confirmation=1)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhoaphantn7604%2Freact-native-element-textinput","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhoaphantn7604%2Freact-native-element-textinput","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhoaphantn7604%2Freact-native-element-textinput/lists"}