
Product
Introducing Reports: An Extensible Reporting Framework for Socket Data
Explore exportable charts for vulnerabilities, dependencies, and usage with Reports, Socketโs new extensible reporting framework.
emoji-picker-react
Advanced tools
The most popular, fully customizable emoji picker for React apps.
๐ด Live Demo | ๐ Report a Bug
npm install emoji-picker-react
Render the component in your app. It works immediately with no required props.
import EmojiPicker from 'emoji-picker-react';
function App() {
return (
<div>
<EmojiPicker onEmojiClick={(emojiObject) => console.log(emojiObject)} />
</div>
);
}
The following is a complete list of all props accepted by EmojiPicker.
| Prop | Type | Default | Description |
|---|---|---|---|
open | boolean | true | Controls the visibility of the picker. |
theme | Theme | Theme.LIGHT | The visual theme. Options: 'light', 'dark', 'auto'. |
emojiStyle | EmojiStyle | EmojiStyle.APPLE | The emoji set to use. Options: 'apple', 'google', 'facebook', 'twitter', 'native'. |
emojiVersion | string | null | Limit emojis to a specific unicode version (e.g., "14.0"). |
lazyLoadEmojis | boolean | false | If true, emoji images are loaded only when they scroll into view. |
autoFocusSearch | boolean | true | Focuses the search input automatically when the picker mounts. |
emojiData | object | undefined | Pass imported locale data here for internationalization. |
| Prop | Type | Default | Description |
|---|---|---|---|
width | string | number | 350 |
height | string | number | 450 |
style | CSSProperties | {} | Inline styles applied to the root element. |
className | string | "" | CSS class applied to the root element. |
| Prop | Type | Description |
|---|---|---|
onEmojiClick | (emojiData: EmojiClickData, event: MouseEvent) => void | Callback triggered when a user clicks an emoji. |
onReactionClick | (emojiData: EmojiClickData, event: MouseEvent) => void | Callback triggered when a user clicks a reaction (in reaction mode). |
onSkinToneChange | (skinTone: SkinTones) => void | Callback triggered when the user selects a new skin tone. |
| Prop | Type | Default | Description |
|---|---|---|---|
searchDisabled | boolean | false | If true, the search bar is completely removed. |
searchPlaceholder | string | "Search" | Placeholder text for the search input. |
searchClearButtonLabel | string | "Clear" | Aria label for the search clear button. |
categories | CategoryConfig[] | (All) | Array of category objects to customize order or visibility. |
suggestedEmojisMode | SuggestionMode | SuggestionMode.FREQUENT | Logic for "Suggested" category. Options: 'recent', 'frequent'. |
defaultSkinTone | SkinTones | SkinTones.NEUTRAL | The initial skin tone. |
skinTonesDisabled | boolean | false | If true, users cannot change the skin tone. |
skinTonePickerLocation | SkinTonePickerLocation | SEARCH | Location of the skin tone trigger. Options: 'SEARCH', 'PREVIEW'. |
| Prop | Type | Default | Description |
|---|---|---|---|
customEmojis | CustomEmoji[] | [] | Array of custom image-based emojis to inject. |
hiddenEmojis | string[] | [] | Array of unified IDs (e.g., '1f921') to hide from the picker. |
previewConfig | PreviewConfig | { showPreview: true } | Configuration for the bottom preview bar. |
getEmojiUrl | (unified: string, style: EmojiStyle) => string | - | Function to override the default CDN URL for emoji images. |
categoryIcons | CategoryIcons | {} | Map Categories enum values to custom React nodes for navigation icons. |
| Prop | Type | Default | Description |
|---|---|---|---|
reactionsDefaultOpen | boolean | false | If true, mounts in "Reactions" mode (single row) instead of full picker. |
reactions | string[] | (Default Set) | Array of unified IDs to display in the reactions bar. |
allowExpandReactions | boolean | true | If true, shows a + button to switch from reactions to full picker. |
Override default variables by targeting .EmojiPickerReact or aside.EmojiPickerReact.
You can customize the picker by overriding CSS variables.
๐จ View Full List of CSS Variables
When passing customEmojis, use this format:
{
id: string; // Unique ID
names: string[]; // Search keywords
imgUrl: string; // Image source
}
Control the footer preview area using previewConfig:
{
defaultEmoji: string; // Default: "1f60a"
defaultCaption: string; // Default: "What's your mood?"
showPreview: boolean; // Default: true
}
You can customize the navigation icons using one of two methods.
Method 1: The categoryIcons prop
Map Categories enum values to valid React nodes:
import EmojiPicker, { Categories } from 'emoji-picker-react';
<EmojiPicker
categoryIcons={{
[Categories.SUGGESTED]: <img src="recent.png" alt="Recent" />,
[Categories.SMILEYS_PEOPLE]: <MyCustomFaceIcon />,
}}
/>;
Method 2: The categories configuration array
Define the icon directly within the category configuration object:
import EmojiPicker, { Categories } from 'emoji-picker-react';
<EmojiPicker
categories={[
{
category: Categories.SUGGESTED,
name: 'Recently Used',
icon: <img src="recent.png" alt="Recent" />,
},
{
category: Categories.SMILEYS_PEOPLE,
name: 'Smileys & People',
icon: <MyCustomFaceIcon />,
},
]}
/>;
Note: If both methods are used for the same category, the icon from the
categoriesconfiguration takes precedence over thecategoryIconsprop.
Import the dictionary you need and pass it to the emojiData prop.
import EmojiPicker from 'emoji-picker-react';
import es from 'emoji-picker-react/dist/data/emojis-es'; // Spanish
function App() {
return <EmojiPicker emojiData={es} />;
}
emojis-bn (Bengali ๐ง๐ฉ)emojis-da (Danish ๐ฉ๐ฐ)emojis-de (German ๐ฉ๐ช)emojis-en-gb (English, GB ๐ฌ๐ง)emojis-en (English, US ๐บ๐ธ)emojis-es-mx (Spanish, Mexico ๐ฒ๐ฝ)emojis-es (Spanish ๐ช๐ธ)emojis-et (Estonian ๐ช๐ช)emojis-fi (Finnish ๐ซ๐ฎ)emojis-fr (French ๐ซ๐ท)emojis-hi (Hindi ๐ฎ๐ณ)emojis-hu (Hungarian ๐ญ๐บ)emojis-it (Italian ๐ฎ๐น)emojis-ja (Japanese ๐ฏ๐ต)emojis-ko (Korean ๐ฐ๐ท)emojis-lt (Lithuanian ๐ฑ๐น)emojis-ms (Malay ๐ฒ๐พ)emojis-nb (Norwegian Bokmรฅl ๐ณ๐ด)emojis-nl (Dutch ๐ณ๐ฑ)emojis-pl (Polish ๐ต๐ฑ)emojis-pt (Portuguese ๐ต๐น)emojis-ru (Russian ๐ท๐บ)emojis-sv (Swedish ๐ธ๐ช)emojis-th (Thai ๐น๐ญ)emojis-uk (Ukrainian ๐บ๐ฆ)emojis-zh-hant (Traditional Chinese ๐น๐ผ)emojis-zh (Simplified Chinese ๐จ๐ณ)This package relies on the window object and must be rendered on the client.
Next.js Example:
import dynamic from 'next/dynamic';
const Picker = dynamic(() => import('emoji-picker-react'), { ssr: false });
If you encounter global is not defined, add this to your HTML:
<script>
window.global = window;
</script>
We welcome contributions! Please check out the Contributing Guide for how to run the project locally.
Shout Outs: Design inspiration by Pavel Bolo.
If you enjoy using emoji-picker-react, check out Vest validation framework.
emoji-mart is a popular emoji picker component for React. It offers a highly customizable and feature-rich emoji picker with support for recent emojis, skin tones, and categories. Compared to emoji-picker-react, emoji-mart provides more customization options and a more polished user interface.
react-emoji-picker is another React component for selecting emojis. It is lightweight and easy to integrate, but it may not offer as many features or customization options as emoji-picker-react. It is suitable for simpler use cases where a basic emoji picker is sufficient.
emoji-picker-element is a web component that can be used in any framework, including React. It provides a modern and customizable emoji picker with support for skin tones and categories. While it is not React-specific, it can be easily integrated into React applications and offers a similar feature set to emoji-picker-react.
FAQs
Emoji Picker component for React Applications on the web
The npm package emoji-picker-react receives a total of 642,597 weekly downloads. As such, emoji-picker-react popularity was classified as popular.
We found that emoji-picker-react demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago.ย It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Explore exportable charts for vulnerabilities, dependencies, and usage with Reports, Socketโs new extensible reporting framework.

Product
Socket for Jira lets teams turn alerts into Jira tickets with manual creation, automated ticketing rules, and two-way sync.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.