# Integrating emoji-picker-react: agent guide A decision-first guide for coding agents and the people reviewing their output. Every snippet here matches the shipped API. For a task to paste into a coding agent, use the [setup, customization, recipe adoption and v5 migration prompts](PROMPTS.md). Each is self-contained and starts with installed-version discovery; the contracts below remain authoritative. ## 1. Check the installed version first Everything below exists from `emoji-picker-react@5.0.0`. A 4.x installation has the same default `` but none of the v5 additions. 1. Read the app's `package.json`, lockfile, and `node_modules/emoji-picker-react/package.json` (`version`, `exports`). 2. Read `node_modules/emoji-picker-react/llms-full.txt`: the full reference for that exact version, usable offline. `llms.txt` is a short index. 3. If the installed version is 4.x, use only v4 APIs (no `/primitives`, `unstyled`, `columns`, `components`, `labels` or loader `emojiData`), or upgrade: [MIGRATION.md](MIGRATION.md) lists every behavior change. ## 2. Pick a path | The app needs | Use | The app styles | The picker owns | | --- | --- | --- | --- | | An emoji picker, fast | `` | Nothing | Complete UI and behavior | | The built-in look in brand colors | `` + `colorScheme` + `--epr-*` color variables | Variables | Complete UI and behavior | | Its own design, supplied layout | `` | Every part, via `[data-epr-part]` | Layout, geometry, behavior | | Its own layout or design-library components | `emoji-picker-react/primitives` | Layout and parts | State, grid, keyboard, ARIA, virtualization | | Search or lookup without UI | `emoji-picker-react/data` | Everything | Dataset search and lookup | BYOD means **bring your own design, design language and design library**. It works with plain CSS, CSS Modules, Tailwind, shadcn/ui, Emotion, styled-components and MUI. **The styling rule.** Color variables (`--epr-bg-color`, `--epr-highlight-color`, …) theme the *built-in look*. `unstyled` and a bare `Root` remove the built-in look, so color variables do nothing there. Size variables (`--epr-emoji-size`, paddings, heights) work in every mode. To reuse the built-in look in a composition, pass `appearance="default"` to `Root`. ## 3. Batteries included ```tsx import EmojiPicker from 'emoji-picker-react'; insertAtCaret(data.emoji)} /> ``` `insertAtCaret` is your application's function. The host owns insertion, trigger state, placement and popover/dialog dismissal. Preserve the text selection and any suffix when inserting. For custom image emojis, `data.emoji` is the custom id; map it to your token or attachment. Search and selection never send messages. ## 4. BYOD with design-library components ```tsx import * as React from 'react'; import * as Picker from 'emoji-picker-react/primitives'; import { Input, Button } from './design-system'; function Cell({ emoji, ...managed }: Picker.EmojiRenderProps) { return (