{
"component": "CometChatSearch",
"package": "@cometchat/chat-uikit-react",
"import": "import { CometChatSearch } from \"@cometchat/chat-uikit-react\";",
"cssImport": "import \"@cometchat/chat-uikit-react/css-variables.css\";",
"description": "Unified search across conversations and messages with filter chips, scoped search, and customizable result views.",
"cssRootClass": ".cometchat-search",
"primaryOutput": {
"prop": "onConversationClicked",
"type": "(event: CometChatSearchConversationClickEvent) => void"
},
"props": {
"data": {
"searchIn": {
"type": "CometChatSearchScope[]",
"default": "[] (both conversations and messages)",
"note": "Empty array shows both sections"
},
"searchFilters": {
"type": "CometChatSearchFilter[]",
"default": "all available filters"
},
"initialSearchFilter": {
"type": "CometChatSearchFilter",
"default": "undefined"
},
"defaultSearchText": {
"type": "string",
"default": "undefined"
},
"uid": {
"type": "string",
"default": "undefined",
"note": "Scope search to a specific user's conversation"
},
"guid": {
"type": "string",
"default": "undefined",
"note": "Scope search to a specific group's conversation"
},
"lastMessageDateTimeFormat": {
"type": "CometChatDateFormatConfig",
"default": "DD/MM/YYYY for all date ranges in search context"
},
"messageSentAtDateTimeFormat": {
"type": "CometChatDateFormatConfig",
"default": "undefined"
},
"conversationsRequestBuilder": {
"type": "CometChat.ConversationsRequestBuilder",
"default": "SDK default",
"note": "Pass the builder instance, not the result of .build()"
},
"messagesRequestBuilder": {
"type": "CometChat.MessagesRequestBuilder",
"default": "SDK default",
"note": "Pass the builder instance, not the result of .build()"
},
"textFormatters": {
"type": "CometChatTextFormatter[]",
"default": "undefined"
}
},
"callbacks": {
"onBack": "() => void",
"onConversationClicked": "(event: CometChatSearchConversationClickEvent) => void",
"onMessageClicked": "(event: CometChatSearchMessageClickEvent) => void",
"onError": "((error: CometChat.CometChatException) => void) | null"
},
"visibility": {
"hideBackButton": { "type": "boolean", "default": false },
"hideUserStatus": { "type": "boolean", "default": false },
"hideGroupType": { "type": "boolean", "default": false },
"hideReceipts": { "type": "boolean", "default": false }
},
"viewSlots": {
"initialView": "ReactNode",
"loadingView": "ReactNode",
"emptyView": "ReactNode",
"errorView": "ReactNode",
"conversationItemView": "(conversation: CometChat.Conversation) => ReactNode",
"conversationLeadingView": "(conversation: CometChat.Conversation) => ReactNode",
"conversationTitleView": "(conversation: CometChat.Conversation) => ReactNode",
"conversationSubtitleView": "(conversation: CometChat.Conversation) => ReactNode",
"conversationTrailingView": "(conversation: CometChat.Conversation) => ReactNode",
"messageItemView": "(message: CometChat.BaseMessage) => ReactNode",
"messageLeadingView": "(message: CometChat.BaseMessage) => ReactNode",
"messageTitleView": "(message: CometChat.BaseMessage) => ReactNode",
"messageSubtitleView": "(message: CometChat.BaseMessage) => ReactNode",
"messageTrailingView": "(message: CometChat.BaseMessage) => ReactNode",
"conversationOptions": "(conversation: CometChat.Conversation) => CometChatSearchConversationOption[]"
}
},
"events": [],
"sdkListeners": [],
"types": {
"CometChatSearchScope": "'conversations' | 'messages'",
"CometChatSearchFilter": "'messages' | 'conversations' | 'unread' | 'groups' | 'photos' | 'videos' | 'links' | 'files' | 'audio'",
"CometChatSearchConversationClickEvent": {
"conversation": "CometChat.Conversation",
"searchKeyword": "string"
},
"CometChatSearchMessageClickEvent": {
"message": "CometChat.BaseMessage",
"searchKeyword": "string"
},
"CometChatSearchConversationOption": {
"id": "string",
"title": "string",
"iconURL": "string | undefined",
"onClick": "(conversation: CometChat.Conversation) => void"
},
"CometChatDateFormatConfig": {
"today": "string | undefined",
"yesterday": "string | undefined",
"lastWeek": "string | undefined",
"otherDays": "string | undefined",
"relativeTime": {
"minute": "string | undefined",
"minutes": "string | undefined",
"hour": "string | undefined",
"hours": "string | undefined"
}
}
}
}