Skip to main content

Message Input Box

The MessageInputBox component is designed to facilitate message sending within our chat app. It internally utilizes the LMChatTextInput component, offering full customization capabilities.

Customisations Available

MessageInputBox supports below styling customisations as of now. All of the styling customisations are optional as of now, if some styling customisation is not provided, then we pick up the default styling which we have.

Customisable props available along with their types:

ParameterTypeOptionalCustomizable Properties for objects
placeholderTextColorstring✔️
selectionColorstring✔️
partsTextStyleobject✔️• color: string
plainTextStyleobject✔️• color: string
placeholderTextstring✔️
inputTextStyleobject✔️• flexGrow: number
• fontSize: string
• fontFamily: string
• maxHeight: number
• padding: number
• marginBottom: number
• overflow: string
sendIconStylesobject✔️• width: number
• height: number
• resizeMode: string
• marginLeft: number
• tintColor: string
attachmentIconStylesobject✔️• width: number
• height: number
• resizeMode: string
micIconStylesobject✔️• width: number
• height: number
• resizeMode: string
• tintColor: string
cameraIconStylesobject✔️• width: number
• height: number
• resizeMode: string
galleryIconStylesobject✔️• width: number
• height: number
• resizeMode: string
documentIconStylesobject✔️• width: number
• height: number
• resizeMode: string
pollIconStylesobject✔️• width: number
• height: number
• resizeMode: string

Code snippet

import { STYLES } from "@likeminds.community/chat-rn-core";

// styling for inputBoxStyles
const inputBoxStyles = {
placeholderTextColor: "#aaa",
selectionColor: "#3CA874",
partsTextStyle: {
color: "#3CA874",
},
sendIconStyles: {
tintColor: "black",
},
micIconStyles: {
tintColor: "black",
},
};

if (inputBoxStyles) {
STYLES.setInputBoxStyle(inputBoxStyles);
}

return <LMOverlayProvider
lmChatClient={lmChatClient}
userName={userName}
userUniqueId={userUniqueId}
profileImageUrl={profileImageUrl}
lmChatInterface={lmChatInterface}
>
{/* Add navigation container */}
</LMOverlayProvider>;