Ballmac UI home

Emoji Picker

An emoji picker that loads its data on first use: search by name or word, jump between groups, pick a skin tone, recent emoji, a real ARIA grid with arrow keys, and any language from Emojibase.

Loading emoji
Pick an emoji

Picked emoji appear here

Installation

$ pnpm dlx shadcn@latest add @ballmac/emoji-picker

Usage

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

The full example is in the Code tab above.

Examples

In a popover, inserting into text

German

Loading emoji
Wähle ein Emoji

Suche nach „Herz“ oder „Katze“

Loading

Loading emoji
Pick an emoji

Could not load

Loading emoji
Pick an emoji

API reference

PropTypeDefault
onSelect*

Called when an emoji is chosen.

(emoji: EmojiSelection) => void—
loadEmojis

Returns the emoji in your language. The default loads English, and only when the picker is first shown. See the docs for other languages.

() => Promise<EmojiData>loadEnglish
columns

Emoji across. The picker is as wide as it needs to be for this many.

number8
skinTone

Show the people's emoji in this tone, 0 for the default yellow to 5 for the darkest. Remembered unless you set it.

number—
onSkinToneChange(tone: number) => void—
recent

Keep the emoji people use most. Off in browsers that block storage.

booleantrue
storageKey

Key under which recent emoji are kept, so two pickers can have their own.

string"ballmac-emoji-recent"
height

Height of the scrolling list.

number288
autoFocus

Focus the search box when the picker mounts.

booleanfalse
hideUnsupported

Leave out emoji this device cannot draw, which would show as empty boxes. On by default.

booleantrue

Also accepts the standard attributes of its root element.

Accessibility

KeyAction
TabSearch, group buttons, the grid (one tab stop) and the skin tones are separate stops
Arrow keysMove across the grid and into the next group; left and right swap in right-to-left
Home / End / Ctrl+Home / Ctrl+EndStart and end of the row, and of the whole grid
Enter / SpaceChoose the emoji
Arrow Down in searchMoves to the first result
Screen readersEach emoji is a button named in the picker's language; results found and the chosen emoji are announced

Quality scorecard

8/8

Every applicable check passes

Measured in Chromium 153.0.8010.12 on October 19, 2026, on version 1.0.0, across 5 examples.

How we measure
  • Passed: Accessibility scan

    No serious or critical issues in light and dark, on a phone and a desktop (axe-core 4.13.0, WCAG 2.1 AA and best-practice rules).

  • Passed: Small screens

    No sideways scrolling at 360, 390 or 1280 px wide.

  • Passed: Reduced motion

    Every endless animation stops when the visitor asks for less motion.

  • Passed: Right to left

    Mirrors correctly in Arabic, Hebrew, Persian and Urdu layouts (0% of elements off the mirror, limit 15%).

  • Passed: Clean console

    No console errors or React hydration errors while loading.

  • Passed: Keyboard

    49 tab stops, each showing a visible change when it takes focus. 6 documented keys.

  • Passed: Loading, empty and error

    Ships loading, error states, each with an example.

  • Passed: Automated tests

    Covered by emoji-picker.test.tsx.

  • For information: Footprint

    7.0 KB of source (gzip) in 1 file. Installs emojibase-data, lucide-react.

Automated checks find a subset of problems and do not replace testing with a screen reader and a keyboard in your own app. What they miss.

Use with AI

<EmojiPicker onSelect={(e) => insert(e.emoji)} />. It loads English emoji on first use. For another language pass loadEmojis that returns fromEmojibase(compact, groups) for that language. Wrap it in a popover for a button. With the shadcn MCP server set up (guide), ask your agent:

Add the Ballmac UI Emoji Picker (@ballmac/emoji-picker) to this project with the shadcn MCP, then use it where it fits.

Use it for

  • Chat, comments and reactions where people add emoji
  • A reaction bar's "more" menu
  • Any text field that needs an emoji button

Not for

  • A fixed handful of reactions; show buttons instead
  • Inserting images or stickers
  • Custom emoji sets; map them into the same EmojiData and pass loadEmojis

Registry JSON: https://ui.ballmac.com/r/emoji-picker.json

Credits

Based on Emojibase, adapted by Ballmac. Free to use in personal and commercial projects.

Ballmac UI Pro

Need the whole screen, not one piece?

150 premium blocks (dashboards, settings, calendars, mail, shops, onboarding), a private shadcn registry and Figma tokens. Blocks that show data come with loading, empty and error states built in.

Not ready? Try three Pro blocks free

Leave your email and the blocks appear right here, ready to copy. Yours to use in any project.