1.0.2 • Published 5 years ago

react-native-chip-input v1.0.2

Weekly downloads
5
License
ISC
Repository
github
Last release
5 years ago

React Native Chip Input

This is like material ui chip input for react native.

How it work

Props

All React Native TextInput props are acceptable as it is.

NameTypeUsage
variantcontained outlinedBy default the chip variant is outlined
inputVariantcontained outlined standardBy default TextInput variant is outlined
sizelarge medium smallBy default the chip size is medium
showChipIcontrue falseBy default it is false
iconNamecloseBy default it has icon name value as close. It accepts all material design icons
chipIconActionfunctionBy default it perform delete action. You can pass your own actions
primaryColorstring hexActs based upon chip variant
secondaryColorstring hexActs based upon chip variant
inputStyle*Accepts style object as parameter for TextInput style
placeholderStyle*Accepts style object for placeholder in TextInput
inputTextStyle*Accepts style object for input value in TextInput

Example

import React from 'react';
import ReactNativeChipInput from 'react-native-chip-input';

const App = () => {
  return (
          <ReactNativeChipInput
            variant="contained"
            inputVarint="outlined"
            showChipIcon={true}
            chipIconAction={e => console.log(e)}
            label="email"
            placeholder="email"
            primaryColor="#1976d2"
            secondaryColor="#ffffff"
            autoCapitalize="none"
            autoCorrect={false}
            autoFocus={true}
          />
         );
   }
 export default App;