All Projects → hoaphantn7604 → react-native-element-textinput

hoaphantn7604 / react-native-element-textinput

Licence: MIT license
A react-native TextInput, TagsInput and AutoComplete component easy to customize for both iOS and Android.

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to react-native-element-textinput

rich input
Rich input box, implement @Someone and subject with color highlighting
Stars: ✭ 58 (+107.14%)
Mutual labels:  input, textfield, textinput
React Selectrix
A beautiful, materialized and flexible React Select control
Stars: ✭ 166 (+492.86%)
Mutual labels:  autocomplete, tags, input
React Input Tags
React component for tagging inputs.
Stars: ✭ 10 (-64.29%)
Mutual labels:  autocomplete, tags, input
Autocompletefield
Subclass of UITextField that shows inline suggestions while typing.
Stars: ✭ 656 (+2242.86%)
Mutual labels:  autocomplete, input, textfield
Core Components
Accessible and lightweight Javascript components
Stars: ✭ 85 (+203.57%)
Mutual labels:  autocomplete, input
V Suggest
A Vue2 plugin for input content suggestions, support using keyboard to navigate and quick pick, it make use experience like search engine input element
Stars: ✭ 67 (+139.29%)
Mutual labels:  autocomplete, input
Vue Places
Places component is based on places.js for Vue 2.x. Turn any <input> into an address autocomplete.
Stars: ✭ 106 (+278.57%)
Mutual labels:  autocomplete, input
Vue Cool Select
Select with autocomplete, slots, bootstrap and material design themes.
Stars: ✭ 195 (+596.43%)
Mutual labels:  autocomplete, input
Ngx Chips
Tag Input component for Angular
Stars: ✭ 840 (+2900%)
Mutual labels:  autocomplete, tags
Jstag
Pure Angular Input Tags project
Stars: ✭ 140 (+400%)
Mutual labels:  autocomplete, tags
ng-sq-ui
Flexible and easily customizable UI-kit for Angular 11+
Stars: ✭ 99 (+253.57%)
Mutual labels:  components, autocomplete
V Tag Suggestion
A simple tag component with typeahead
Stars: ✭ 40 (+42.86%)
Mutual labels:  autocomplete, tags
react-autocomplete-tags
React Autocomplete Tags
Stars: ✭ 17 (-39.29%)
Mutual labels:  autocomplete, tags
React Input Enhancements
Set of enhancements for input control
Stars: ✭ 1,375 (+4810.71%)
Mutual labels:  autocomplete, input
Contentful Tags Autocomplete Extension
UI Extension for Contenful (CMS) to add an autocompleting tags widget to content types
Stars: ✭ 10 (-64.29%)
Mutual labels:  autocomplete, tags
elements
Lovingly crafted ui components based on web components. Works well with all Frameworks - including Angular, React and Vue.
Stars: ✭ 42 (+50%)
Mutual labels:  components, elements
paper-chip
A chip web component made with Polymer 2 following Material Design guidelines
Stars: ✭ 30 (+7.14%)
Mutual labels:  autocomplete, input
tag-picker
Better tags input interaction with JavaScript.
Stars: ✭ 27 (-3.57%)
Mutual labels:  tags, input
Vue Tags Input
A tags input component for VueJS
Stars: ✭ 761 (+2617.86%)
Mutual labels:  autocomplete, tags
el.js
✨ Higher-order elements powered by transclusion.
Stars: ✭ 35 (+25%)
Mutual labels:  components, elements

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

    npm install react-native-element-textinput --save

or

    yarn add react-native-element-textinput

Source code demo

Demo

TextInput 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
numeric Boolean No Input value is numeric
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
numeric Boolean No Input value is numeric
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
numeric Boolean No Input value is numeric
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
numeric Boolean No Input value is numeric
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

  import React, { useState } from 'react';
  import { StyleSheet, View } from 'react-native';
  import { TextInput } from 'react-native-element-textinput';

  const TextInputComponent = () => {
    const [value, setValue] = useState('');

    return (
      <View style={styles.container}>
        <TextInput
          value={value}
          style={styles.input}
          inputStyle={styles.inputStyle}
          labelStyle={styles.labelStyle}
          placeholderStyle={styles.placeholderStyle}
          textErrorStyle={styles.textErrorStyle}
          label="TextInput"
          placeholder="Placeholder"
          placeholderTextColor="gray"
          focusColor="blue"
          onChangeText={text => {
            setValue(text);
          }}
        />
      </View>
    );
  };

  export default TextInputComponent;

  const styles = StyleSheet.create({
    container: {
      padding: 16,
    },
    input: {
      height: 55,
      paddingHorizontal: 12,
      borderRadius: 8,
      borderWidth: 0.5,
      borderColor: '#DDDDDD',
    },
    inputStyle: { fontSize: 16 },
    labelStyle: {
      fontSize: 14,
      position: 'absolute',
      top: -10,
      backgroundColor: 'white',
      paddingHorizontal: 4,
      marginLeft: -4,
    },
    placeholderStyle: { fontSize: 16 },
    textErrorStyle: { fontSize: 16 },
  });

Example 2

  import React, { useState } from 'react';
  import { StyleSheet, View } from 'react-native';
  import { TextInput } from 'react-native-element-textinput';

  const TextInputComponent = () => {
    const [value, setValue] = useState('');

    return (
      <View style={styles.container}>
        <TextInput
          value={value}
          style={styles.input}
          inputStyle={styles.inputStyle}
          labelStyle={styles.labelStyle}
          placeholderStyle={styles.placeholderStyle}
          textErrorStyle={styles.textErrorStyle}
          label="TextInput"
          placeholder="Placeholder"
          placeholderTextColor="gray"
          onChangeText={text => {
            setValue(text);
          }}
        />
      </View>
    );
  };

  export default TextInputComponent;

  const styles = StyleSheet.create({
    container: {
      padding: 16,
    },
    input: {
      height: 55,
      paddingHorizontal: 12,
      borderRadius: 8,
      backgroundColor: 'white',
      shadowColor: '#000',
      shadowOffset: {
        width: 0,
        height: 1,
      },
      shadowOpacity: 0.2,
      shadowRadius: 1.41,
      elevation: 2,
    },
    inputStyle: { fontSize: 16 },
    labelStyle: { fontSize: 14 },
    placeholderStyle: { fontSize: 16 },
    textErrorStyle: { fontSize: 16 },
  });

Example 3

  import React, { useState } from 'react';
  import { StyleSheet, View } from 'react-native';
  import { TextInput } from 'react-native-element-textinput';

  const TextInputComponent = () => {
    const [value, setValue] = useState('');

    return (
      <View style={styles.container}>
        <TextInput
          value={value}
          style={styles.input}
          inputStyle={styles.inputStyle}
          labelStyle={styles.labelStyle}
          placeholderStyle={styles.placeholderStyle}
          textErrorStyle={styles.textErrorStyle}
          label="Password"
          placeholder="Placeholder"
          placeholderTextColor="gray"
          secureTextEntry
          onChangeText={text => {
            setValue(text);
          }}
        />
      </View>
    );
  };

  export default TextInputComponent;

  const styles = StyleSheet.create({
    container: {
      padding: 16,
    },
    input: {
      height: 55,
      paddingHorizontal: 12,
      borderRadius: 8,
      backgroundColor: 'white',
      shadowColor: '#000',
      shadowOffset: {
        width: 0,
        height: 1,
      },
      shadowOpacity: 0.2,
      shadowRadius: 1.41,
      elevation: 2,
    },
    inputStyle: { fontSize: 16 },
    labelStyle: { fontSize: 14 },
    placeholderStyle: { fontSize: 16 },
    textErrorStyle: { fontSize: 16 },
  });

Example 4

  import React, { useState } from 'react';
  import { StyleSheet, View } from 'react-native';
  import { HashtagInput } from 'react-native-element-textinput';

  const TextInputComponent = () => {
    const [value, setValue] = useState<string[]>([]);

    return (
      <View style={styles.container}>
        <HashtagInput
          data={value}
          style={styles.input}
          inputStyle={styles.inputStyle}
          labelStyle={styles.labelStyle}
          placeholderStyle={styles.placeholderStyle}
          textErrorStyle={styles.textErrorStyle}
          hashtagStyle={styles.hashtagStyle}
          hashtagTextStyle={styles.hashtagTextStyle}
          placeholder="Hashtag..."
          placeholderTextColor="gray"
          onChangeValue={value => {
            setValue(value);
          }}
        />
      </View>
    );
  };

  export default TextInputComponent;

  const styles = StyleSheet.create({
    container: {
      padding: 16,
    },
    input: {
      height: 55,
      paddingHorizontal: 12,
      borderRadius: 8,
      backgroundColor: 'white',
      shadowColor: '#000',
      shadowOffset: {
        width: 0,
        height: 1,
      },
      shadowOpacity: 0.2,
      shadowRadius: 1.41,
      elevation: 2,
    },
    inputStyle: { fontSize: 16 },
    labelStyle: { fontSize: 14 },
    placeholderStyle: { fontSize: 16 },
    textErrorStyle: { fontSize: 16 },
    hashtagStyle: {
      borderWidth: 0,
      borderRadius: 16,
      padding: 8,
      backgroundColor: 'white',
      shadowColor: '#000',
      shadowOffset: {
        width: 0,
        height: 1,
      },
      shadowOpacity: 0.2,
      shadowRadius: 1.41,
      elevation: 2,
    },
    hashtagTextStyle: {
      fontSize: 16,
    },
  });

Example 5

  import React, { useState } from 'react';
  import { StyleSheet, View } from 'react-native';
  import { TagsInput } from 'react-native-element-textinput';

  const TextInputComponent = () => {
    const [value, setValue] = useState([]);

    return (
      <View style={styles.container}>
        <TagsInput
          data={value}
          style={styles.input}
          inputStyle={styles.inputStyle}
          labelStyle={styles.labelStyle}
          placeholderStyle={styles.placeholderStyle}
          textErrorStyle={styles.textErrorStyle}
          tagsStyle={styles.tagsStyle}
          tagsTextStyle={styles.tagsTextStyle}
          label="TagsInput"
          placeholder="Tags..."
          placeholderTextColor="gray"
          onChangeValue={value => {
            setValue(value);
          }}
        />
      </View>
    );
  };

  export default TextInputComponent;

  const styles = StyleSheet.create({
    container: {
      padding: 16,
    },
    input: {
      paddingHorizontal: 12,
      borderRadius: 8,
      backgroundColor: 'white',
      shadowColor: '#000',
      shadowOffset: {
        width: 0,
        height: 1,
      },
      shadowOpacity: 0.2,
      shadowRadius: 1.41,
      elevation: 2,
    },
    inputStyle: {
      fontSize: 16,
      minWidth: 80,
    },
    labelStyle: {
      fontSize: 14,
      position: 'absolute',
      top: -10,
      backgroundColor: 'white',
      paddingHorizontal: 4,
      marginLeft: -4,
    },
    placeholderStyle: { fontSize: 16 },
    textErrorStyle: { fontSize: 16 },
    tagsStyle: {
      borderWidth: 0,
      borderRadius: 16,
      padding: 8,
      backgroundColor: 'white',
      shadowColor: '#000',
      shadowOffset: {
        width: 0,
        height: 1,
      },
      shadowOpacity: 0.2,
      shadowRadius: 1.41,
      elevation: 2,
    },
    tagsTextStyle: {
      fontSize: 16,
    },
  });

Example 6

  import React, { useState } from 'react';
  import { StyleSheet, View } from 'react-native';
  import { AutoComplete } from 'react-native-element-textinput';

  const TextInputComponent = () => {
    const [value, setValue] = useState('');

    return (
      <View style={styles.container}>
        <AutoComplete
          value={value}
          data={['hello', 'how are you', 'complete']}
          style={styles.input}
          inputStyle={styles.inputStyle}
          labelStyle={styles.labelStyle}
          placeholderStyle={styles.placeholderStyle}
          textErrorStyle={styles.textErrorStyle}
          label="Auto Complete"
          placeholder="Placeholder..."
          placeholderTextColor="gray"
          onChangeText={e => {
            setValue(e);
          }}
        />
      </View>
    );
  };

  export default TextInputComponent;

  const styles = StyleSheet.create({
    container: {
      padding: 16,
    },
    input: {
      height: 55,
      paddingHorizontal: 12,
      borderRadius: 8,
      backgroundColor: 'white',
      shadowColor: '#000',
      shadowOffset: {
        width: 0,
        height: 1,
      },
      shadowOpacity: 0.2,
      shadowRadius: 1.41,
      elevation: 2,
    },
    inputStyle: { fontSize: 16 },
    labelStyle: { fontSize: 14 },
    placeholderStyle: { fontSize: 16 },
    textErrorStyle: { fontSize: 16 },
  });
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].