1.0.4 • Published 3 years ago

react-native-dynamic-textinput v1.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

react-native-dynamic-textinput

Demo

npm.io

Installation

npm i react-native-dynamic-textinput --save
npm i react-native-vector-icons --save

or

yarn add react-native-dynamic-textinput
yarn add react-native-vector-icons

Usage

import DynamicTextinput from 'react-native-dynamic-textinput';

<DynamicTextinput
  backgroundColor={'black'}
  borderTopColor={'black'}
  placeholderText={'Write a message here'}
  placeholderTextColor="#CFD1DE"
  messageTextColor={'#000'}
  textInputBgColor={'#f5f5f5'}
  editable={true}
  multiline={true}
  keyboardType={'default'}
  sendButtonDisableColor={'#f5f5f0'}
  sendButtonEnableColor={'#0C0A6C'}
  textInputProps={{autoFocus: true}} //TextInput props
  disableSendButton={false}
  onPressSendButton={() => console.debug("message sent")} //add your action
  messageText={message} //Your message variable
  onChange={(msg) => console.debug(msg)}
  sendButtonIcon={<image style={{width: 20, height: 20}} tintColor={'#fff'} source={url('../../icon')} />}
  heightInput={45}
/>

Props

Proptypedescription
editablebooleandefine if user can edit the typed text
multilinebooleanenable multiple lines
sendButtonDisableColorstringsendbutton disabled color
sendButtonEnableColorstringsendbutton enabled color
borderTopColorstringcomponent borderTopColor
placeholderTextstringtextinput placeholder value
placeholderTextColorstringtextInput placeholder color
messageTextColorstringtyped text color
keyboardTypestringcheck react-native keyboardType
sendButtonBgColorstringsendbutton background color
textInputBgColorstringtextInput background color
backgroundColorstringcomponent backgroundColor
disableSendButtonbooldisable sendbutton
howManyLeftButtonsnumbernumber of buttons on left from the textInput
leftButtonsReact-native Viewadd buttons on left from the textInput
sendColorIconstringsendColor default icon
heightInputnumberheight input
sendButtonIconReact-native componentchange icon send button
textInputPropsReact-native TextInputTextInput props