# Migrate from rn-emoji-keyboard

> Switch from rn-emoji-keyboard to Patine UI: EmojiPickerSheet with search, recents, skin tones and a category bar that follows the platform, or an inline EmojiPicker.

# Migrate from `rn-emoji-keyboard`

`EmojiPickerSheet` takes `open` and `onOpenChange` like the other sheets, and `onSelect` gets the emoji string first. Search and recently used are on by default. Skin tones are built in, and the category bar sits where the platform's own emoji keyboard has it. For a picker inside your own layout, use [`EmojiPicker`](../../components/emoji-picker).

:::note React Native 0.88

`rn-emoji-keyboard` 1.7.0, the latest release, calls `InteractionManager.runAfterInteractions`. React Native 0.88 no longer exports `InteractionManager`, so the keyboard throws `Cannot read property 'runAfterInteractions' of undefined` when it renders. `EmojiPicker` uses React Native core only and works on 0.88.

:::

```diff
- import EmojiPicker from 'rn-emoji-keyboard';
+ import { EmojiPickerSheet } from 'patine-ui';

- <EmojiPicker open={open} onClose={() => setOpen(false)} onEmojiSelected={(e) => setEmoji(e.emoji)} />
+ <EmojiPickerSheet open={open} onOpenChange={setOpen} onSelect={setEmoji} />
```

| rn-emoji-keyboard | Patine UI |
| --- | --- |
| `open` | `open` |
| `onClose` / `onRequestClose` | `onOpenChange(false)` |
| `onEmojiSelected({ emoji, name, … })` | `onSelect(emoji, data)`; `data` has `name`, `keywords`, `category`, `version`, `skins` |
| `allowMultipleSelections` | `closeOnSelect={false}` |
| `enableSearchBar` | `searchable` (on by default) |
| `enableRecentlyUsed` | `showRecent` (on by default); `recent` / `onRecentChange` to keep them |
| `categoryPosition="top" \| "bottom"` | `categoryBarPosition="top" \| "bottom"` |
| `disabledCategories` | `categories` lists the ones to show |
| `categoryOrder` | the order of `categories` |
| `emojiSize` | `emojiSize` |
| `defaultHeight` | `sheetProps={{ height }}` |
| `translation` | `categoryLabels`, `searchPlaceholder`, `emptyText` |
| `theme` / `styles` | `theme` tokens and `styles` slots |
| `selectedEmojis` | no equivalent |
| — | `maxEmojiVersion` to hide emoji older phones can't draw, `exclude` |

See [EmojiPicker](../../components/emoji-picker) for skin tones, recents and the field.

See [all migration guides](./index.mdx) for other libraries, and [Comparison](../comparison.mdx) for when another library is the better choice.
