Skip to content
nexubDesign System
v11.9.0

Components · Form Controls

Emoji Picker

AlphaAdded v11.2.0

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';
View as Markdown

Usage

Use it for
  • An emoji for a space, doc, label or status.

  • A reaction picker: `EmojiPicker.Panel` inside your own popover.

Use something else for
  • An icon from the design system: use IconPicker.

  • Emoji inside running text: let the keyboard’s emoji input handle it.

Playground

Props

size
TSX
<EmojiPicker aria-label="Space icon" value={emoji} onValueChange={setEmoji} />

Examples

Default

Panel in a popover

States

States

  • default
  • disabled
  • invalid
  • readOnly
  • size="sm"
  • size="md"
  • size="lg"

Props

Props
PropTypeDefaultDescription
valuestring—The picked emoji, skin tone included. null for none.
defaultValuestringnullThe picked emoji, skin tone included. null for none.
onValueChange((emoji: string) => void)—Called with the picked emoji. The picker closes.
placeholderstringmessages.pickEmojiShown on the trigger when nothing is picked.
recentstring[]—Recent picks, newest first. Unset: the last 16 picks are kept in localStorage (nx-emoji-recent).
skinTone0 | 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.
defaultSkinTone0 | 1 | 2 | 3 | 4 | 5the last tone chosen on this device, else 0Skin 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.
namestring—A hidden input posts the value with a plain form.
disabledboolean—Field states, as on Select. Read-only stays focusable and does not open.
readOnlyboolean—Field states, as on Select. Read-only stays focusable and does not open.
invalidboolean—Field states, as on Select. Read-only stays focusable and does not open.
requiredboolean—Field states, as on Select. Read-only stays focusable and does not open.
size'sm' | 'md' | 'lg''md'Height of the trigger.
sheetfalse | true | 'auto''auto' (a bottom sheet below 768px)The grid as a bottom sheet below 768px.
EmojiPicker.Panelcomponent—The grid alone (value, onValueChange, recent, skin tone props, autoFocus), for any popover or page.
aria-describedbystring—
aria-invalidfalse | true | 'true' | 'false'—
aria-labelstring—
aria-labelledbystring—
aria-requiredfalse | true | 'true' | 'false'—
classNamestring—
idstring—

Accessibility

ARIA roles

combobox (trigger)listbox with a group per categoryoption

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.

On iOS & Android