Skip to main content

LMChatButton

LMChatButton serves as a UI component designed for the purpose of rendering various buttons, including Attachment buttons, Send button, Mic button, and other input buttons within a chat interface.

Props Available

The LMChatButton 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
textLMChatTextViewPropsRepresents the text displayed on the button✔️
iconLMChatIconPropsRepresents the icon displayed on the button✔️
onTap(value?: any) => voidRepresents the functionality on click of the button
placement"start" | "end"Represents the placement of the icon on the button✔️
isActivebooleanRepresents the active/inactive state of the button✔️
activeIconLMChatIconPropsIcon displayed when the button is in an active state✔️
activeTextLMChatTextViewPropsText displayed when the button is in an active state✔️
buttonStyleViewStyleRepresents the style of the button✔️
isClickablebooleanIndicates if the button is disabled or not✔️

Code snippet

<LMChatButton
onTap={}
icon={{
assetPath: require(""),
type: "png",
height: , // height of icon
width: , // width of icon
}}
text={{
text: "", // text to be displayed
textStyle: //style for texts,
}}
buttonStyle={} //style for button
/>