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

ConversationSearch

PDF
Focus Mode
Font Size
Last updated: 2025-07-22 16:06:20
ConversationSearch uses the Search component, supporting search functionality for users, groups, and messages. It integrates features such as the search bar, advanced search, and search result display.

Basic Usage

import {
UIKitProvider,
ConversationList,
ConversationSearch,
} from '@tencentcloud/chat-uikit-react';

import type {
ConversationSearchProps,
SearchResultItem,
SearchType,
} from '@tencentcloud/chat-uikit-react';

const CustomConversationSearch = (props: ConversationSearchProps) => {
const onSelectResult = (data: SearchResultItem, type: SearchType) => {
console.warn(`Select Search Result: ${JSON.stringify(data)}, type: ${type}`);
};
return (
<ConversationSearch {...props} onResultItemClick={onSelectResult} />
);
};

const App = () => {
return (
<UIKitProvider>
<ConversationList
style={{ maxWidth: '300px', height: '600px' }}
ConversationSearch={CustomConversationSearch}
/>
</UIKitProvider>
);
};

Props

Parameter Name
Type
Default Value
Description
visible
boolean
true
Whether it is visible.
Search
ComponentType<SearchProps>
-
custom search component
variant
VariantType
VariantType.MINI
Search mode: mini, standard, embedded
SearchBar
React.ComponentType<SearchBarProps>
DefaultSearchBar
custom search bar component
React.ComponentType<SearchResultsProps>
DefaultSearchResults
custom search result component
React.ComponentType<SearchAdvancedProps>
DefaultSearchAdvanced
custom advanced search component
SearchResultsPresearch
React.ComponentType
-
search placeholder component
SearchResultsLoading
React.ComponentType
-
loading placeholder component
SearchResultsEmpty
React.ComponentType
-
empty result placeholder component
SearchResultItem
React.ComponentType<ResultItemProps>
-
custom search result item component
debounceTime
number
300
search debounce time (ms)
autoFocus
boolean
false
Whether to auto-focus the search box
className
string
-
custom style class name
style
React.CSSProperties
-
custom style
onKeywordChange
(keyword: string) => void
-
searchsearch keywords change callback']
onSearchComplete
(results: Map<SearchType, SearchResult>) => void
-
search completed callback
onResultItemClick
(data: SearchResultItem, type: SearchType) => void
-
search result click callback
onError
(error: Error) => void
-
error callback






Help and Support

Was this page helpful?

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

Feedback