Components · Form Controls
Emoji Picker
Pick an emoji from a searchable grid with categories, recent picks and skin tone. A popover, a bottom sheet on phones.
import { EmojiPicker } from '@nexub/react';Usage
An emoji for a space, doc, label or status.
A reaction picker: `EmojiPicker.Panel` inside your own popover.
An icon from the design system: use IconPicker.
Emoji inside running text: let the keyboard’s emoji input handle it.
Playground
Props
<EmojiPicker aria-label="Space icon" value={emoji} onValueChange={setEmoji} />Examples
Default
Panel in a popover
States
States
defaultdisabledinvalidreadOnlysize="sm"size="md"size="lg"
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| value | string | — | The picked emoji, skin tone included. null for none. |
| defaultValue | string | null | The picked emoji, skin tone included. null for none. |
| onValueChange | ((emoji: string) => void) | — | Called with the picked emoji. The picker closes. |
| placeholder | string | messages.pickEmoji | Shown on the trigger when nothing is picked. |
| recent | string[] | — | Recent picks, newest first. Unset: the last 16 picks are kept in localStorage (nx-emoji-recent). |
| skinTone | 0 | 1 | 2 | 3 | 4 | 5 | — | Skin tone for emoji that take one (0 is the default yellow). Unset: the last tone chosen on this device. |
| defaultSkinTone | 0 | 1 | 2 | 3 | 4 | 5 | the last tone chosen on this device, else 0 | Skin tone for emoji that take one (0 is the default yellow). Unset: the last tone chosen on this device. |
| onSkinToneChange | ((tone: SkinTone) => void) | — | Called when the tone changes. |
| name | string | — | A hidden input posts the value with a plain form. |
| disabled | boolean | — | Field states, as on Select. Read-only stays focusable and does not open. |
| readOnly | boolean | — | Field states, as on Select. Read-only stays focusable and does not open. |
| invalid | boolean | — | Field states, as on Select. Read-only stays focusable and does not open. |
| required | boolean | — | Field states, as on Select. Read-only stays focusable and does not open. |
| size | 'sm' | 'md' | 'lg' | 'md' | Height of the trigger. |
| sheet | false | true | 'auto' | 'auto' (a bottom sheet below 768px) | The grid as a bottom sheet below 768px. |
| EmojiPicker.Panel | component | — | The grid alone (value, onValueChange, recent, skin tone props, autoFocus), for any popover or page. |
| aria-describedby | string | — | |
| aria-invalid | false | true | 'true' | 'false' | — | |
| aria-label | string | — | |
| aria-labelledby | string | — | |
| aria-required | false | true | 'true' | 'false' | — | |
| className | string | — | |
| id | string | — |
Accessibility
ARIA roles
Keyboard
- Enter / Space / Arrow Down
On the trigger: opens the picker with focus in the search box.
- Arrow Down
From the search box: into the grid.
- Arrow keys
Move between emoji; Arrow Up from the first row returns to the search box.
- Home / End
First or last emoji in the row; with Ctrl, in the whole list.
- Enter / Space
Picks the focused emoji. Enter in the search box picks the first result.
- Escape
Closes without changing the value.
Notes
Each emoji is named by its CLDR-style name ("party popper"), not read as a glyph.
The emoji set loads when the picker opens, in its own chunk, so it stays out of the main bundle.