Android(Compose)
Component Overview
MessageInput is a Jetpack Compose component that provides a full-featured message input interface for users. It supports composing and sending various message types, including text, images, videos, files, and voice messages. Additional features include emoji selection, flexible style configuration, and extensive customization options.
Message Input Interface | Emoji Picker |
![]() | ![]() |
Component Integration
MessageInput is included in TUIKit Compose. To use MessageInput, integrate TUIKit Compose into your project. For detailed integration steps, see the TUIKit Compose documentation.
Component Structure
MessageInput consists of the main input component and a style configuration protocol, enabling message input functionality with support for customization.
Public Methods
Method | Parameter | Description |
MessageInput | conversationID: String | Conversation ID that identifies the current chat session. For C2C Chat, use the format c2c_userID. For group chat, use group_groupID. |
| modifier: Modifier | Jetpack Compose modifier for configuring style, layout, behavior, and appearance. |
| config: MessageInputConfigProtocol | Input style configuration that controls which function buttons are displayed. |
| messageInputViewModelFactory: MessageInputViewModelFactory | Factory for creating the internal MessageInputViewModel. Typically, you do not need to provide this manually, as a default implementation is available. |
Basic Usage
Initialize and use the MessageInput component by passing a conversation ID.
Box(modifier = Modifier.fillMaxWidth()) {MessageInput(conversationID = conversationID,modifier = Modifier.navigationBarsPadding())}
Customization
Customize which feature buttons appear on the input bar:
// Specify which function buttons to displayMessageInput(conversationID = conversationID,config = ChatMessageInputConfig(isShowAudioRecorder = false, // Hide audio recordingisShowPhotoTaker = true, // Show photo captureisShowMore = true, // Show more features))
See the customization results below:
Default Input Box | Audio Recording Hidden | All Features Hidden |
![]() | ![]() | ![]() |




