Xzero UI
Pro library

Emoji pickerPro

A full emoji picker with instant search, scroll-synced categories, skin tones, recently used emoji, and a virtualized, keyboard-navigable grid.

$ pnpm dlx shadcn@4.23.0 add @xzero-ui-pro/emoji-picker
Live · keyboard ready

When to use

When not to use

Installation

Register both Xzero UI namespaces in your project's components.json:

{
  "registries": {
    "@xzero-ui": "https://mcp.xzero.co.uk/r/{name}.json",
    "@xzero-ui-pro": "https://mcp.xzero.co.uk/r/pro/{name}.json"
  }
}
npx shadcn@4.23.0 add @xzero-ui-pro/emoji-picker

Install xzero-foundation once, and import @/components/xzero/foundation.css in your app root. No Xzero token is used by this snapshot. For sample portraits, photos, fonts, or logos, download https://mcp.xzero.co.uk/install-assets.mjs and run node xzero-install-assets.mjs <receiving-project>.

Usage

import { EmojiPicker } from "@/components/xzero/emoji-picker/emoji-picker";
import { Popover, PopoverContent, PopoverTrigger } from "@/components/xzero/popover/popover";

export function EmojiButton({ onInsert }: { onInsert: (emoji: string) => void }) {
  const [open, setOpen] = useState(false);
  return (
    <Popover open={open} onOpenChange={setOpen}>
      <PopoverTrigger aria-label="Add emoji"><SmilePlus /></PopoverTrigger>
      <PopoverContent side="top" style={{ padding: 0, width: "min(22rem, calc(100vw - 20px))" }}>
        <EmojiPicker
          onSelect={(selection, event) => {
            onInsert(selection.emoji);
            if (!event.shiftKey) setOpen(false);
          }}
        />
      </PopoverContent>
    </Popover>
  );
}

API reference

EmojiPicker

A full emoji picker: instant search over names and keywords, category tabs whose indicator follows your scroll, skin tones, recently used emoji remembered on the device, a preview row with the emoji name, and a virtualized grid that is fully usable from the keyboard. Ships its own dataset of every emoji up to Emoji 15.0. It has no chrome of its own, so it drops into a popover, sheet, or card.

PropTypeDefaultDescription
onSelect(selection: EmojiSelection, event: MouseEvent | KeyboardEvent) => void–Called when an emoji is chosen by click, Enter, or Space. selection has emoji (with the skin tone applied), base, name, and skinTone. Check event.shiftKey to keep a popover open for several picks.
skinTone0 | 1 | 2 | 3 | 4 | 5–Controlled skin tone: 0 is the default yellow, 1 to 5 go from light to dark.
defaultSkinTone0 | 1 | 2 | 3 | 4 | 5–Skin tone before anything has been stored.
onSkinToneChange(tone: SkinTone) => void–Called when a tone is chosen in the tone menu.
storageKeystring | null"arc-emoji-picker"localStorage key for recent emoji and the tone. Pass null to keep them in memory for this page only. Blocked storage falls back to memory automatically.
recentLimitnumber27How many recently used emoji to keep.
defaultRecentstring[]18 popular emojiShown under Popular until something has been picked.
columnsnumber–Emoji per row. Defaults to as many 36px cells as fit, at least 6.
autoFocusbooleanfalseFocuses the search field on mount. Popovers and dialogs usually focus it already.
searchPlaceholderstring"Search emoji"Placeholder of the search field.
labelstring"Emoji picker"Accessible name of the picker group.
classNamestring–Class on the root. Set --emoji-picker-width and --emoji-picker-height to size it (352px by 408px by default).
styleCSSProperties–Styles on the root.

Keyboard interactions

KeysAction
TypeFilters every emoji by name and keyword; the best match is ready for Enter. Typing while the grid has focus goes to the search field.
EnterIn the search field, picks the highlighted emoji. In the grid, picks the active emoji.
Arrow DownFrom the search field, moves into the grid.
Arrow keysMove through the grid. Up and down keep the column across sections; Up from the first row returns to search.
Home / EndFirst or last emoji in the row. With Ctrl or Cmd, first or last emoji overall.
Page Up / Page DownMoves a screen of rows.
SpacePicks the active emoji in the grid.
Arrow Left / Arrow RightIn the category bar, moves between categories; Enter jumps to one. In the tone menu, moves between tones.
EscapeCloses the tone menu, then clears the search, then closes the surrounding popover.

Accessibility

Motion

Responsive behavior

Performance

Notes for AI

Also in pickers

Guidance for AI tools

Emoji picker: A full emoji picker with instant search, scroll-synced categories, skin tones, recently used emoji, and a virtualized, keyboard-navigable grid. Follow the declared prop types and do not invent props. Keep keyboard access, reduced motion support, and both light and dark themes intact when adapting it.

Full library index: https://ui.xzero.co.uk/llms.txt

Browse all components