EmojiPicker

Search and pick any emoji, filed by category.

Loading…
😊
<EmojiPicker locale="fr" onEmojiSelect={setEmoji} />

A panel, not a trigger: put it in a popover, a sheet or a page. The emoji data comes from emoji.hopla.llc in the picker's locale on first render and is cached by the browser afterwards; emojibaseUrl points it at another copy of Emojibase. The kit ships no copy, so pass the search placeholder and the loading and empty states.

The chat's hover bar opens this same picker behind its "+".

API

PropTypeDefault
onEmojiSelect(emoji: string) => voidrequiredThe emoji picked, as its character.
autoFocusbooleanfalseFocus the search field on mount, as a popover opened to pick wants.
emojibaseUrlstringEMOJIBASE_URLWhere the Emojibase data lives; emoji.hopla.llc by default.
emptyLabelstring—Shown when the search matches nothing.
loadingLabelstring—Shown while the emoji data loads.
localeLocale—The emoji names' and search's language; the picker's own default otherwise.
searchPlaceholderstring—The search field's placeholder.
columnsnumber8The number of columns in the list.
emojiVersionnumber—Which Emoji version (https://emojipedia.org/emoji-versions) to use, to manually control which emojis are visible regardless of the current browser's supported Emoji versions.
exitExit—Inside a <Presence>: plays this child's way out before it unmounts.
resolveEmojiDataEmojiDataResolver—Returns emoji data for the current locale, synchronously or asynchronously. Custom data is used as-is, without version or country-flag filtering. Delegate to defaultEmojiDataResolver to use Emojibase data. Runs on mount and when locale, emojiVersion, or emojibaseUrl changes. Changing the function alone doesn't reload data.
skinToneSkinTone—The skin tone of the emoji picker.
stickyboolean—Whether the category headers should be sticky.

Plus the DOM props of the element it renders. Source: emoji-picker/components/emoji-picker.tsx.