CometChatStickersKeyboard component provides a browsable sticker picker that fetches stickers from the CometChat stickers extension. Stickers are organized by category tabs with a grid layout, supporting loading, empty, and error states.
Overview
The Stickers Keyboard component enables sticker selection:- Category Tabs: Stickers are organized into categories displayed as tabs with icon previews
- Grid Layout: Stickers within each category are displayed in a 4-column grid
- State Management: Handles loading, loaded, empty, and error states
- Auto Focus: Optionally focuses the first tab when the keyboard opens
- Focus Trapping: Optionally traps focus within the keyboard for modal-like behavior
- Keyboard Accessible: Full keyboard navigation including Tab, Arrow keys for grid navigation, Enter/Space to select, and Escape to close
Live Preview — default stickers keyboard preview.
Open in Storybook ↗
Basic Usage
Simple Sticker Picker
With Custom State Text
Properties
Events
StickerClickEvent Interface
Customization
CSS Variables
The Stickers Keyboard component uses BEM-style CSS classes that can be customized with CSS variables:Accessibility
Keyboard Navigation
- Tab: Moves focus between the category tabs and the sticker grid
- ArrowLeft / ArrowRight: Navigate between category tabs
- ArrowUp / ArrowDown / ArrowLeft / ArrowRight: Navigate the sticker grid in 2D (4-column layout)
- Enter / Space: Select the focused sticker, emitting the
stickerClickevent - Escape: Close the keyboard, emitting the
closeKeyboardevent - Focus trapping keeps keyboard navigation within the component when
trapFocusis enabled
Screen Reader Support
- Category tabs are announced with their category name
- Sticker items are announced with their sticker name
- State changes (loading, error, empty) are announced via the
LiveAnnouncerService
Related Components
- CometChatStickerBubble - Displays a sent sticker in a message bubble
- CometChatMessageComposer - Message composer that integrates the stickers keyboard
- CometChatEmojiKeyboard - Similar keyboard component for emoji selection