Skip to content
WunderUI

Emoji Picker

Free

A grid of emoji to pick from, for reactions and short labels. It holds no state, so you decide what a pick does.

npx wunderui-cli add emoji-picker

Playground

Picked: nothing yet

Installation

bash
npx wunderui-cli add emoji-picker

Writes the source into your project with its dependencies and, on first use, the styles - see Installation.

Then import what you need:

tsx
import { EmojiPicker } from "@/components/wunderui/emoji-picker"

Then use it:

tsx
import { useState } from "react"
import { EmojiPicker } from "@/components/ui/emoji-picker"

export function Reactions() {
  const [picked, setPicked] = useState<string | null>(null)

  return (
    <div className="flex flex-col items-center gap-3">
      <EmojiPicker onSelect={setPicked} />
      <p>Picked: {picked ?? "nothing yet"}</p>
    </div>
  )
}

Expected result: You see a card with twelve emoji in two rows of six. Press one and its emoji appears after the word Picked.

When to use

Use Emoji Picker for

  • Reactions under a message, a comment or a post, where one tap adds an emoji
  • A short, curated set of emoji to label or mood-tag something
  • Inserting an emoji into a comment box or a status line

Use something else for

  • Rating for a score from one to five rather than a free choice of emoji
  • Combobox for a long list that people search by typing
  • Dropdown Menu for a list of actions with text labels

Placement

The picker has no popup of its own. Put it in a Popover, which opens below its trigger by default and above it when there is no room.

After a pick

The picker does not close anything. Close the popover on select when one emoji is enough, or leave it open when people add several.

Picked: nothing yet

Keyboard interactions

Every emoji is a native button, so the browser provides focus and activation. The picker adds no arrow key navigation: each button is one tab stop.

TaborShiftTab
Moves focus to the next or previous emoji, left to right and top to bottom.
EnterorSpace
Picks the focused emoji and calls with it.
Escape
In a Popover: closes it and returns focus to the trigger. The picker itself does nothing on Escape.

Behavior and motion

What the picker does with state, layout, names and motion.

No state
The picker does not remember a pick, show a selected emoji or close anything. Every press hands you the emoji, and what follows is yours: store it, insert it, close the Popover.
Layout
Six columns with 4 px between them, 32 px buttons and 8 px of padding. Fewer than six emoji leave the panel 230 px wide, more than six wrap onto new rows, and there is no maximum height or scrolling.
Names
The group is named Emoji and each button is named by its emoji, so a screen reader reads the standard name, such as fire. A custom picture is not announced like that, so use real emoji characters.
The default set
By default the picker shows twelve: grinning face, tears of joy, heart eyes, thumbs up, folded hands, fire, party popper, red heart, crying face, open mouth, clapping hands and rocket.
Surface
The panel uses the popover surface with a border and a large shadow, because it normally floats. Inside a card you can lay it flat by removing the shadow.
Motion
The picker has no motion of its own: hover and pressed fills change at once. A Popover around it fades and scales in, and out a step faster.
Reduced motion
With reduced motion the Popover keeps its fade and drops the scale. The picker has nothing to remove.

Anatomy

The figure shows the panel and one emoji button. The picker has no search, categories or popup of its own, so put it in a Popover when it should float.

  • A panel with a grid of emoji buttons, in a group named Emoji. It keeps no state: it hands the pressed emoji to your handler and you decide what happens next.

  • The card around the grid: a border, the popover surface, a shadow and 16 px corners. Six columns with 4 px between them and 8 px of padding make a row 230 px wide.

  • A 32 px button with 8 px corners, named by its emoji. Hover fills it with the page tone, pressed with the subtle tone, and keyboard focus shows the indigo border and 2 px ring.

Best practices

  • Do

    Put the picker inside a Popover opened by an icon button and close it on pick. The picker draws its own card, so strip the border, background, padding and shadow from the popover content.

  • Do

    Pass a short list of emoji in a fixed order. The grid has six columns, so 6, 12 or 18 emoji fill every row.

  • Do

    Give the trigger an accessible name such as Add a reaction. The picker names its own buttons by their emoji, but the button that opens it needs words.

  • Don’t

    Don't use it as an emoji keyboard. It shows only the emoji you pass: no search, categories, skin tones or recently used.

  • Don’t

    Don't use an emoji as the only information in a control. The buttons are named by the emoji alone, so keep visible text where the meaning matters.

  • Don’t

    Don't expect it to close anything. The picker does not know about the Popover it sits in, so a pick leaves it open until you close it.

API reference

One table. EmojiPicker is a plain component, so this table lists every prop.

A panel with a grid of emoji buttons, in a group named Emoji. It keeps no state: it hands the pressed emoji to your handler and you decide what happens next.

PropTypeDefaultDescription
emojisstring[]DEFAULT_EMOJISThe emoji to show, one string each, in order. Defaults to twelve common reactions. The grid has six columns, so a multiple of six fills every row. Each emoji must be unique, because it is the key.
onSelect(emoji: string) => void—Called with the emoji that was pressed. The picker keeps no selection, so store the emoji, insert it or close the Popover here.
classNamestring—Extra classes for the panel, for example inside a card or a different .

Notes for AI

Give your coding assistant the Markdown reference instead of screenshots.

MCPget_component("emoji-picker")
Installnpx wunderui-cli add emoji-picker

The full library index for assistants is at /llms.txt.