Skip to main content

Chat TextInput

Overview

LMChatTextInput is a UI component specifically crafted to facilitate message input within a chat interface. It functions as an interactive input box, allowing users to seamlessly compose messages as part of their chat experience. Additionally, it supports features like tagging and media, enhancing user interaction by enabling users to mention others or share multimedia content within the chat.

LMFeedMediaPreviewScreen

Customisation/Props

The LMChatTextInput component requires certain props, some of which are mandatory, while others are optional. Here is a breakdown of the available props along with their types:

ParameterTypeDescriptionOptional
inputTextstringRepresents the text to be displayed on the text input
onType(value: string) => voidCallback function called when the text input's text changes
partTypesPartType[]Array of part types✔️
inputRefRef<TextInput>Reference to the text input component✔️
containerStyleStyleProp<ViewStyle>Style for the container of the text input✔️
inputTextStyleTextStyleStyle for the input text✔️
placeholderTextstringText to be displayed before any text is entered✔️
placeholderTextColorstringColor of the placeholder text✔️
autoCapitalize"none" | "sentences" | "words" | "characters"Auto capitalization behavior of the input text✔️
keyboardType"default" | "number-pad" | "decimal-pad"Type of keyboard to be opened✔️
plainTextStyleStyleProp<TextStyle>Style for plain text (not placeholder or input text)✔️
multilineFieldbooleanIndicates if the input text should be multi-lined or not✔️
secureTextbooleanIndicates if the entered text should be hidden (e.g., for passwords)✔️
disabledbooleanIndicates if the text input is editable or not✔️
autoFocusbooleanChecks if the text input should be in focus by default✔️