Launch Week Day 1: Socket for Jira Is Now Available.Learn More โ†’
Socket
Book a DemoSign in
Socket

emoji-picker-react

Package Overview
Dependencies
Maintainers
1
Versions
309
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

emoji-picker-react

Emoji Picker component for React Applications on the web

latest
Source
npmnpm
Version
4.18.0
Version published
Weekly downloads
771K
4.06%
Maintainers
1
Weekly downloads
ย 
Created
Source

๐Ÿฅ’ Emoji Picker React (v4)

The most popular, fully customizable emoji picker for React apps.

๐Ÿ”ด Live Demo | ๐Ÿ› Report a Bug

image

reactions

โœจ Features

  • ๐ŸŽจ Fully Customizable: Control styles via CSS variables.
  • ๐ŸŒ— Dark Mode: Native support for light, dark, and auto themes.
  • ๐Ÿ–ฑ๏ธ Interactivity: Custom click handlers and reactions picker mode.
  • ๐ŸŒ Multi-Language: Built-in support for dozens of languages.
  • ๐Ÿฆ„ Custom Emojis: seamless support for custom image-based emojis.
  • ๐Ÿ“ฆ Zero-Config: Works out of the box with sensible defaults.
  • ๐Ÿ“ฑ Responsive: Mobile-friendly design.
  • ๐ŸŽ Multiple Styles: Support for Apple, Google, Facebook, Twitter, and Native system emojis.

๐Ÿš€ Getting Started

Installation

npm install emoji-picker-react

Basic Usage

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>
  );
}

๐Ÿ“š Props Reference

The following is a complete list of all props accepted by EmojiPicker.

๐ŸŽ›๏ธ General Configuration

PropTypeDefaultDescription
openbooleantrueControls the visibility of the picker.
themeThemeTheme.LIGHTThe visual theme. Options: 'light', 'dark', 'auto'.
emojiStyleEmojiStyleEmojiStyle.APPLEThe emoji set to use. Options: 'apple', 'google', 'facebook', 'twitter', 'native'.
emojiVersionstringnullLimit emojis to a specific unicode version (e.g., "14.0").
lazyLoadEmojisbooleanfalseIf true, emoji images are loaded only when they scroll into view.
autoFocusSearchbooleantrueFocuses the search input automatically when the picker mounts.
emojiDataobjectundefinedPass imported locale data here for internationalization.

๐Ÿ“ Dimensions & Styling

PropTypeDefaultDescription
widthstringnumber350
heightstringnumber450
styleCSSProperties{}Inline styles applied to the root element.
classNamestring""CSS class applied to the root element.

๐Ÿ–ฑ๏ธ Events & Interaction

PropTypeDescription
onEmojiClick(emojiData: EmojiClickData, event: MouseEvent) => voidCallback triggered when a user clicks an emoji.
onReactionClick(emojiData: EmojiClickData, event: MouseEvent) => voidCallback triggered when a user clicks a reaction (in reaction mode).
onSkinToneChange(skinTone: SkinTones) => voidCallback triggered when the user selects a new skin tone.

๐Ÿ”Ž Search & Categories

PropTypeDefaultDescription
searchDisabledbooleanfalseIf true, the search bar is completely removed.
searchPlaceholderstring"Search"Placeholder text for the search input.
searchClearButtonLabelstring"Clear"Aria label for the search clear button.
categoriesCategoryConfig[](All)Array of category objects to customize order or visibility.
suggestedEmojisModeSuggestionModeSuggestionMode.FREQUENTLogic for "Suggested" category. Options: 'recent', 'frequent'.
defaultSkinToneSkinTonesSkinTones.NEUTRALThe initial skin tone.
skinTonesDisabledbooleanfalseIf true, users cannot change the skin tone.
skinTonePickerLocationSkinTonePickerLocationSEARCHLocation of the skin tone trigger. Options: 'SEARCH', 'PREVIEW'.

๐Ÿฆ„ Customization & Advanced

PropTypeDefaultDescription
customEmojisCustomEmoji[][]Array of custom image-based emojis to inject.
hiddenEmojisstring[][]Array of unified IDs (e.g., '1f921') to hide from the picker.
previewConfigPreviewConfig{ showPreview: true }Configuration for the bottom preview bar.
getEmojiUrl(unified: string, style: EmojiStyle) => string-Function to override the default CDN URL for emoji images.
categoryIconsCategoryIcons{}Map Categories enum values to custom React nodes for navigation icons.

โค๏ธ Reactions Picker Mode

PropTypeDefaultDescription
reactionsDefaultOpenbooleanfalseIf true, mounts in "Reactions" mode (single row) instead of full picker.
reactionsstring[](Default Set)Array of unified IDs to display in the reactions bar.
allowExpandReactionsbooleantrueIf true, shows a + button to switch from reactions to full picker.

๐Ÿ› ๏ธ Detailed Configuration

CSS Variables

Override default variables by targeting .EmojiPickerReact or aside.EmojiPickerReact.

CSS Variables

You can customize the picker by overriding CSS variables.

๐ŸŽจ View Full List of CSS Variables

Custom Emojis Data Structure

When passing customEmojis, use this format:

{
  id: string;      // Unique ID
  names: string[]; // Search keywords
  imgUrl: string;  // Image source
}

Preview Config

Control the footer preview area using previewConfig:

{
  defaultEmoji: string; // Default: "1f60a"
  defaultCaption: string; // Default: "What's your mood?"
  showPreview: boolean; // Default: true
}

Custom Category Icons

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 categories configuration takes precedence over the categoryIcons prop.

๐ŸŒ Internationalization (i18n)

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} />;
}
View Supported Languages
  • 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 ๐Ÿ‡จ๐Ÿ‡ณ)

โš ๏ธ Troubleshooting

Server-Side Rendering (Next.js / Remix)

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 });

Vite

If you encounter global is not defined, add this to your HTML:

<script>
  window.global = window;
</script>

๐Ÿค Contributing

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.

Keywords

emoji-picker

FAQs

Package last updated on 07 Feb 2026

Did you know?

Socket

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.

Install

Related posts