AI Integration Quick Reference
AI Integration Quick Reference
| Field | Value |
|---|---|
| Package | @cometchat/chat-uikit-react |
| Key class | CometChatUrlsFormatter (extends CometChatTextFormatter) |
| Required setup | CometChatUIKit.init(UIKitSettings) then CometChatUIKit.login("UID") |
| Purpose | Auto-detects URLs in text messages and converts them to clickable links |
| Sample app | GitHub |
| Related | Custom Text Formatter | All Guides |
CometChatUrlsFormatter extends CometChatTextFormatter to detect URLs in text messages and render them as clickable links.

Usage
ExtendCometChatTextFormatter, set regex patterns for URL detection, and override onRegexMatch and registerEventListeners to handle formatting and click behavior.
- TypeScript
Customization
Styling links
Apply CSS to your link class:Handling clicks
OverrideonUrlClick to add tracking or custom navigation:
Next Steps
Custom Text Formatter
Build custom inline text patterns.
Message List
Render real-time message threads.
All Guides
Browse all feature and formatter guides.
Sample App
Full working sample application on GitHub.