🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

rn-chat-input

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rn-chat-input

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

0.0.2
latest
npm
Version published
Weekly downloads
98
Maintainers
1
Weekly downloads
 
Created
Source

React Native Chat Input

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.

React Native Chat Input Example

Installation

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

Usage

import ChatInput from 'rn-chat-input';
 <ChatInput showUploadOption={true} onSend={handleSend} sendText={sendText} placeHolderText={placeHolderText} images={images} defaultStyleValues={defaultStyles}/>

Props

All the ChatInput props can be passed.

PropTypeDescription
showUploadOptionbooleanDetermines whether the upload option is shown. Set to true to enable uploads
defaultStyleValuesDefaultStyleTypesCustom styles for different parts of the component
imagesChatInputImagesAllows customization of icons (attach, close).
sendTextstringText to display on the send button
placeHolderTextstringPlaceholder text shown in the input field.
onSend(messages: Message[]) => voidCallback fired when messages are sent.

DefaultStyle Props

KeyTypeDescription
containerStyleViewStyleStyle for the overall input container.
inputStyleTextStyleStyle for the text input field.
buttonStyleViewStyleStyle for the send button container.
buttonTextStyleTextStyleStyle for the send button text.
uploadButtonStyleViewStyleStyle for the upload button.
uploadIconStyleImageStyleStyle for the upload icon image.
previewContainerStyleViewStyleStyle for the preview items container.
previewImageStyleViewStyleStyle for previewed images.
previewFileStyleViewStyleStyle for previewed file blocks.
modalStyleViewStyleStyle for the modal container.
modalOptionStyleTextStyleStyle for modal options text.
cancelOptionStyleTextStyleStyle for cancel option text.

FAQs

Package last updated on 04 Jun 2025

Did you know?

Socket

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.

Install

Related posts