Skip to main content
CometChatEmojiKeyboard is a categorised emoji picker: eight sections in one scrolling grid, under a strip of category icons. The message list opens it to add a reaction. You can also host it yourself. The emojis come with the Kit — no extension and no network. There is no search, no recents and no skin tones.
CometChatEmojiKeyboard showing emoji categories and the Smileys set

Where It Fits

The message list opens the keyboard in a 400 pt sheet with a grabber, from both the message menu’s add-reaction button and the reactions row’s ”+” / “+N” chip. Picking an emoji adds it as a reaction — picking one you have already reacted with sends it again rather than removing it — and closes the sheet.
CometChatEmojiKeyboard is a View. The emoji file is read once per app run, so after the first open the keyboard appears full.To show your own picker instead, set onEmojiPickerClick (the menu’s button) or onAddMoreReactionsClick (the ”+” chip) on the list; either replaces the keyboard for its entry. See Message List ▸ Reactions.

Quick Start

The keyboard does not close itself and does not add a reaction; the host does both.
The keyboard fills the space it is given. In a sheet at the list’s height:

Actions and Events

Callback Methods

Both hand back the emoji as a String.

How It Behaves

  • Scrolling selects a tab. The selected tab is the last category with any part on screen.
  • Tapping a tab scrolls that category’s name to the top. A tap while the grid is still moving only highlights the tab.
  • The strip keeps the selected tab in view.
  • If the bundled file cannot be read, the keyboard stays blank. There is no error state.
The tab moves on as soon as the next category’s name scrolls into view at the bottom. Category names come from the emoji file and are not translated — “symbols” is lower-case there.

Functionality


Advanced Methods

Store Access

CometChatEmojiKeyboardStore reads the emoji file and holds the categories and the selected tab. Pass a seeded one to show fixed emojis — in a preview, for example. A seeded store never reads the file:
To supply another emoji set, implement EmojiRepository and pass it: CometChatEmojiKeyboardStore(repository: MyEmojiSet()).

Subclassing

CometChatEmojiKeyboard is a View struct. Customise it with its parameters and style.

Accessibility

  • Each emoji is a button that reads as the emoji. Each tab is a button that reads as the category’s name, marked selected for the current one; each section name is a heading.
  • Section names follow Dynamic Type and never truncate; the emojis stay 30 pt.

Style

CometChatEmojiKeyboardStyle is sparse: set only what you change, and everything else follows the theme.
The message list does not pass a style to the keyboard it presents.

Next Steps

Message List

Opens the keyboard to add a reaction

Message Composer

Compose and send messages