Documentation Index Fetch the complete documentation index at: https://cometchat-22654f5b-react-uikit-v7.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
AI Integration Quick Reference
{
"component" : "CometChatStickersKeyboard" ,
"package" : "@cometchat/chat-uikit-react" ,
"import" : "import { CometChatStickersKeyboard } from \" @cometchat/chat-uikit-react \" ;" ,
"description" : "Sticker picker with category tabs and grid layout." ,
"cssRootClass" : ".cometchat-stickers-keyboard" ,
"props" : {
"callbacks" : {
"onStickerClick" : { "type" : "(event: CometChatStickerClickEvent) => void" , "default" : "required" },
"onClose" : { "type" : "() => void" , "default" : "undefined" }
},
"behavior" : {
"autoFocus" : { "type" : "boolean" , "default" : "true" },
"stickerData" : { "type" : "CometChatStickerSet" , "default" : "undefined" },
"initialState" : { "type" : "'loading' | 'error' | 'empty'" , "default" : "undefined" }
},
"text" : {
"errorStateText" : { "type" : "string" , "default" : "localized error text" },
"emptyStateText" : { "type" : "string" , "default" : "localized empty text" }
},
"styling" : {
"className" : { "type" : "string" , "default" : "undefined" }
}
}
}
Where It Fits
CometChatStickersKeyboard is opened from the message composer when the sticker button is clicked. It fetches stickers from the CometChat stickers extension API and displays them in a categorized grid.
import { CometChatStickersKeyboard } from "@cometchat/chat-uikit-react" ;
import "@cometchat/chat-uikit-react/css-variables.css" ;
function StickerPicker ({ onSelect , onClose }) {
return (
< CometChatStickersKeyboard
onStickerClick = { ( e ) => onSelect ( e . stickerUrl , e . stickerName ) }
onClose = { onClose }
/>
);
}
Minimal Render
import { CometChatStickersKeyboard } from "@cometchat/chat-uikit-react" ;
import "@cometchat/chat-uikit-react/css-variables.css" ;
function Demo () {
return < CometChatStickersKeyboard onStickerClick = { ( e ) => console . log ( e ) } /> ;
}
Root CSS class: .cometchat-stickers-keyboard
Features
Fetches stickers from CometChat.callExtension('stickers', 'GET', 'v1/fetch')
Category tabs with horizontal wheel scroll
4-column CSS Grid with per-image shimmer placeholders
Loading shimmer, error state with retry, empty state
Escape key closes the keyboard
Full keyboard navigation: ArrowLeft/Right for tabs, Arrow keys for grid
ARIA: role="dialog", role="tablist"/"tab", role="grid"/"gridcell"
loading="lazy" on all sticker images
prefers-reduced-motion respected
Props
onStickerClick
Callback when a sticker is selected. Required.
Type (event: CometChatStickerClickEvent) => voidDefault —
onClose
Callback when the keyboard requests close (Escape key).
Type () => voidDefault undefined
autoFocus
Whether to auto-focus the first tab on mount.
stickerData
Pre-loaded sticker data. When provided, skips the SDK fetch. Useful for Storybook and testing.
Type CometChatStickerSetDefault undefined
initialState
Force an initial state. When set, the component renders in this state without fetching.
Type 'loading' | 'error' | 'empty'Default undefined
errorStateText
Custom text displayed in the error state.
Type stringDefault Localized error text
emptyStateText
Custom text displayed in the empty state.
Type stringDefault Localized empty text
className
Optional custom CSS class appended to the root container.
Type stringDefault undefined
CSS Selectors
Target Selector Root .cometchat-stickers-keyboardTabs container .cometchat-stickers-keyboard__tabsSingle tab .cometchat-stickers-keyboard__tabActive tab .cometchat-stickers-keyboard__tab--activeTab icon .cometchat-stickers-keyboard__tab-iconSticker grid .cometchat-stickers-keyboard__gridSticker item .cometchat-stickers-keyboard__sticker-itemSticker image .cometchat-stickers-keyboard__sticker-imageShimmer placeholder .cometchat-stickers-keyboard__sticker-shimmerError state .cometchat-stickers-keyboard__errorRetry button .cometchat-stickers-keyboard__retry-buttonEmpty state .cometchat-stickers-keyboard__empty