tencent cloud

Chat

News and Announcements
Release Notes
Announcements
Product Introduction
Overview
Basic Concepts
Scenarios
Features
Account System
User Profile and Relationship Chain
Message Management
Group Related
Official Account
Audio/Video Call
Use Limits
Purchase Guide
Billing Overview
Pricing
Purchase Instructions
Renewal Guide
Service Suspension Explanation
Refund Policy
Development Guidelines
Demo Zone
Activate Service
Free Demos
Quick Run
Download
SDK and Demo Source Code
Update Log
Chat Interaction (UI Included)
TUIKit Introduction
Getting Started
Full-feature Integration
Single-function Integration
Build with AI
Build Basic Interfaces
More Features
Customizing Appearance
Internationalization
Push Service
Overview
Noun explanation
Activate the Service
Quick Start
Manufacturer Channel
Statistics
Troubleshooting Tool
Client APIs
REST API
Push Callback
Advanced Features
Release Notes
Error Codes
FAQS
Desk
Overview
Quick Start
Integration Guide
Admin Operation Manual
Agent Manual
More Practices
Live Streaming Setup Guide
AI Chatbot
Super Large Entertainment and Collaboration Community
Discord Implementation Guide
How to Integrate Chat into Games
WhatsApp Channel-style Official Account Integration Solution
Send Red Packet
Firewall Restrictions
No UI Integration
Quick Start
SDK Integration
Initialization
Login and Logout
Message
Conversation
Group
Community Topic
User Profile and Relationship Chain
Offline Push
Cloud Search
Local Search
Official Channel Management
Client APIs
JavaScript
Android
iOS & macOS
Swift
Flutter
Electron
Unity
React Native
C APIs
C++
Server APIs
Secure authentication with UserSig
RESTful APIs
Webhooks
Console Guide
New Console Introduction
Creating and Upgrading an Application
Basic Configuration
Feature Configuration
Account Management
Group Management
Official Channel Management
Webhook Configuration
Usage
Viewing Guide for Resource Packages
Real-Time Monitor
Auxiliary Development Tools
Access Management
Advanced Features
FAQs
uni-app FAQs
Purchase
SDK
Account Authentication
User Profile and Relationship Chain
Message
Group
Audio-Video Group
Nickname and Profile Photo
Security Compliance Certification
Service Level Agreement
Security Compliance Certification
Chat Policies
Privacy Policy
Data Privacy and Security Agreement
Migration
Migration Solutions
Migration Solutions Lite
Error Codes
Contact Us

Android(Compose)

PDF
Focus Mode
Font Size
Last updated: 2026-03-02 17:56:23

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 display
MessageInput(
conversationID = conversationID,
config = ChatMessageInputConfig(
isShowAudioRecorder = false, // Hide audio recording
isShowPhotoTaker = true, // Show photo capture
isShowMore = true, // Show more features
)
)
See the customization results below:
Default Input Box
Audio Recording Hidden
All Features Hidden




Help and Support

Was this page helpful?

Help us improve! Rate your documentation experience in 5 mins.

Feedback