
Research
Security News
The Growing Risk of Malicious Browser Extensions
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
rn-chat-input
Advanced tools
The rn-chat-input package is a simple and flexible chat input component for React Native apps. It lets users send text messages and upload media from the gallery or file picker. It also includes file previews, image viewer, and easy file removal before se
The rn-chat-input package is a simple and flexible chat input component for React Native apps. It lets users send text messages and upload media from the gallery or file picker. It also includes file previews, image viewer, and easy file removal before sending.
Download the package with npm or yarn
npm install rn-chat-input
In order for rn-chat-input to work, you also need to install the following dependencies:
npm install react-native-image-picker react-native-document-picker
import ChatInput from 'rn-chat-input';
<ChatInput showUploadOption={true} onSend={handleSend} sendText={sendText} placeHolderText={placeHolderText} images={images} defaultStyleValues={defaultStyles}/>
All the ChatInput
props can be passed.
Prop | Type | Description |
---|---|---|
showUploadOption | boolean | Determines whether the upload option is shown. Set to true to enable uploads |
defaultStyleValues | DefaultStyleTypes | Custom styles for different parts of the component |
images | ChatInputImages | Allows customization of icons (attach, close). |
sendText | string | Text to display on the send button |
placeHolderText | string | Placeholder text shown in the input field. |
onSend | (messages: Message[]) => void | Callback fired when messages are sent. |
Key | Type | Description |
---|---|---|
containerStyle | ViewStyle | Style for the overall input container. |
inputStyle | TextStyle | Style for the text input field. |
buttonStyle | ViewStyle | Style for the send button container. |
buttonTextStyle | TextStyle | Style for the send button text. |
uploadButtonStyle | ViewStyle | Style for the upload button. |
uploadIconStyle | ImageStyle | Style for the upload icon image. |
previewContainerStyle | ViewStyle | Style for the preview items container. |
previewImageStyle | ViewStyle | Style for previewed images. |
previewFileStyle | ViewStyle | Style for previewed file blocks. |
modalStyle | ViewStyle | Style for the modal container. |
modalOptionStyle | TextStyle | Style for modal options text. |
cancelOptionStyle | TextStyle | Style for cancel option text. |
FAQs
The rn-chat-input package is a simple and flexible chat input component for React Native apps. It lets users send text messages and upload media from the gallery or file picker. It also includes file previews, image viewer, and easy file removal before se
The npm package rn-chat-input receives a total of 98 weekly downloads. As such, rn-chat-input popularity was classified as not popular.
We found that rn-chat-input demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
Research
Security News
An in-depth analysis of credential stealers, crypto drainers, cryptojackers, and clipboard hijackers abusing open source package registries to compromise Web3 development environments.
Security News
pnpm 10.12.1 introduces a global virtual store for faster installs and new options for managing dependencies with version catalogs.