Emoji Picker
A trigger button opening a popover with a search box over a keyboard-navigable grid of the full Unicode emoji set, grouped by category. Search matches names and CLDR keywords — typing happy finds faces whose official names never say it. Picking emits the character and closes; the picker holds no value of its own.
Installation
Copy the piece into your app — it compiles with your build and the code is yours:
puzzle add piece emoji-picker npm install @magic-spells/morph-engine
Pulls in lib/emoji-data.js (the grouped Unicode inventory) and lib/emoji-keywords.js (the search keywords). If you don't need search, use Emoji Picker Simple instead — it skips the keyword file entirely.
Usage
import EmojiPicker from '@/components/ui/EmojiPicker.pzl';
<EmojiPicker @change={ addEmoji }/>
// events: { addEmoji: (char) => { …append char to your state… } }The @change callback receives the picked emoji as a string — append it to your input, react to a message, or do whatever the character calls for. The picker closes itself and returns focus to the trigger.
Custom trigger
Placement
Controlled open
Morph
Keyboard
Focus stays on the search box the whole time — the grid is walked with aria-activedescendant. Arrow keys move the highlighted cell (Left/Right by one, Up/Down by a row of eight), Home and End jump, Enter picks, Escape closes and refocuses the trigger, and Tab closes while letting focus move on naturally.