Emoji Picker

2 variants

A full emoji picker with search, category tabs, skin tones, recent emoji, and keyboard navigation, plus a reaction bar built on it.

Message reactions

Reaction pills that toggle with rolling counts, and an add button that morphs open the picker. New reactions pop in at the end of the row.

Mira Okafor 10:42

The new onboarding flow is live. Sign-ups are up 18% since this morning.

"use client";

import { EmojiReactions } from "@/components/premium/emoji-picker";

const PORTRAIT =
  "https://images.unsplash.com/photo-1494790108377-be9c29b29330?auto=format&fit=crop&crop=faces&fm=webp&q=80&w=96&h=96";

export function EmojiReactionsPreview() {
  return (
    <div className="flex w-full max-w-md gap-3">
      {/* biome-ignore lint/performance/noImgElement: small remote portrait in a sample message. */}
      <img
        src={PORTRAIT}
        alt=""
        className="size-9 shrink-0 rounded-full object-cover"
      />
      <div className="min-w-0">
        <p className="text-sm">
          <span className="font-medium">Mira Okafor</span>{" "}
          <span className="text-xs text-muted-foreground">10:42</span>
        </p>
        <p className="mt-1 text-sm text-pretty">
          The new onboarding flow is live. Sign-ups are up 18% since this
          morning.
        </p>
        <EmojiReactions
          className="mt-3"
          defaultReactions={[
            { emoji: "🎉", count: 6, mine: false },
            { emoji: "🚀", count: 3, mine: true },
            { emoji: "👀", count: 1, mine: false },
          ]}
        />
      </div>
    </div>
  );
}

Install

$ bunx --bun shadcn add @beui-pro/emoji-picker

API Reference

Every prop is optional unless marked required. Data, copy, and colors default to the sample content.

EmojiPicker9 props
  • onSelectRequired

    Receives the emoji character in the chosen skin tone.

    (char: string, emoji: Emoji) => void
  • skinTone

    Controlled skin tone, from 0 (default yellow) to 5 (dark).

    0 | 1 | 2 | 3 | 4 | 5
  • defaultSkinTone

    Starting skin tone when uncontrolled. Defaults to 0.

    0 | 1 | 2 | 3 | 4 | 5

    Default 0

  • onSkinToneChange

    Called with the new tone when the user picks a skin tone.

    ((tone: SkinTone) => void)
  • recentStorageKey

    localStorage key for recent emoji; pass null to keep them in memory.

    string | null

    Default beui-pro-emoji-recent

  • columns

    Emojis per grid row; also sets the picker width. Defaults to 8.

    number

    Default 8

  • autoFocus

    Focus the search field on mount.

    boolean

    Default true

  • labels

    Overrides for the search, status, and accessibility text.

    Partial<EmojiPickerLabels>
  • className

    Classes merged onto the root element.

    string
EmojiPickerPopover15 props
  • onSelectRequired

    Receives the emoji character in the chosen skin tone.

    (char: string, emoji: Emoji) => void
  • skinTone

    Controlled skin tone, from 0 (default yellow) to 5 (dark).

    0 | 1 | 2 | 3 | 4 | 5
  • defaultSkinTone

    Starting skin tone when uncontrolled. Defaults to 0.

    0 | 1 | 2 | 3 | 4 | 5
  • onSkinToneChange

    Called with the new tone when the user picks a skin tone.

    ((tone: SkinTone) => void)
  • recentStorageKey

    localStorage key for recent emoji; pass null to keep them in memory.

    string | null
  • columns

    Emojis per grid row; also sets the picker width. Defaults to 8.

    number
  • autoFocus

    Focus the search field on mount.

    boolean
  • labels

    Overrides for the search, status, and accessibility text.

    Partial<EmojiPickerLabels>
  • className

    Classes merged onto the root element.

    string
  • triggerRequired

    The element that opens the picker, such as a shared Button.

    ReactElement<unknown, string | JSXElementConstructor<any>>
  • closeOnSelect

    Close after an emoji is picked. Defaults to true.

    boolean

    Default true

  • side

    Side of the trigger the popover opens on. Defaults to top.

    "left" | "right" | "top" | "bottom"

    Default top

  • align

    Popover alignment along the trigger edge. Defaults to start.

    "center" | "start" | "end"

    Default start

  • open

    Controlled open state of the popover.

    boolean
  • onOpenChange

    Called with the next open state when the popover opens or closes.

    ((open: boolean) => void)
EmojiReactions6 props
  • reactions

    Controlled list of reaction pills, in display order.

    readonly Reaction[]
  • defaultReactions

    Starting reactions when uncontrolled. Defaults to none.

    readonly Reaction[]

    Default []

  • onReactionsChange

    Called with the full updated list when a reaction is toggled or added.

    ((reactions: Reaction[]) => void)
  • pickerProps

    Props passed to the picker, such as a skin tone or storage key.

    Omit<EmojiPickerPopoverProps, "onSelect" | "trigger">
  • addLabel

    Accessible label for the add reaction button.

    string

    Default Add reaction

  • className

    Classes merged onto the root element.

    string
Types3 types

The object types these props take, field by field.

Emoji7 fields
  • idRequired

    Unicode hexcode, stable across skin tones.

    string
  • charRequired

    Emoji character in the default skin tone.

    string
  • labelRequired

    Name shown in the preview bar and used for search.

    string
  • tagsRequired

    Extra search keywords, matched by prefix.

    string[]
  • groupRequired

    Emojibase group number that places it in a category.

    number
  • versionRequired

    Unicode emoji version the glyph shipped in.

    number
  • skins

    Characters for tones 1–5, when the emoji supports them.

    Partial<Record<Exclude<SkinTone, 0>, string>>
EmojiPickerLabels6 fields
  • searchRequired

    Search field placeholder and accessible label.

    string
  • skinToneRequired

    Accessible label for the skin tone switcher.

    string
  • noResultsRequired

    Builds the empty-state message from the trimmed search query.

    (query: string) => string
  • resultsRequired

    Builds the search results header from the match count.

    (count: number) => string
  • loadingRequired

    Accessible label for the placeholder grid while emoji load.

    string
  • pickRequired

    Grid label and preview bar text before an emoji is hovered.

    string
Reaction3 fields
  • emojiRequired

    Emoji character shown in the pill.

    string
  • countRequired

    Number of people who reacted with this emoji.

    number
  • mineRequired

    Whether the viewer has reacted with this emoji.

    boolean

Picker panel

The picker on its own: search by name or tag, jump between categories as the tabs follow your scroll, preview on hover, and pick a skin tone. It loads the emoji set on first open and hides glyphs the device cannot draw.

Pick an emoji

Pick a few emoji

"use client";

import { useState } from "react";
import { EmojiPicker } from "@/components/premium/emoji-picker";

export function EmojiPickerPanelPreview() {
  const [picked, setPicked] = useState<string[]>([]);

  return (
    <div className="flex flex-col items-center gap-4">
      <div className="overflow-hidden rounded-3xl border border-border bg-background">
        <EmojiPicker
          autoFocus={false}
          onSelect={(char) =>
            setPicked((current) => [...current, char].slice(-12))
          }
        />
      </div>
      <p aria-live="polite" className="h-7 text-xl tracking-wide">
        {picked.join("") || (
          <span className="text-sm text-muted-foreground">
            Pick a few emoji
          </span>
        )}
      </p>
    </div>
  );
}

Install

$ bunx --bun shadcn add @beui-pro/emoji-picker-panel

API Reference

Every prop is optional unless marked required. Data, copy, and colors default to the sample content.

EmojiPicker9 props
  • onSelectRequired

    Receives the emoji character in the chosen skin tone.

    (char: string, emoji: Emoji) => void
  • skinTone

    Controlled skin tone, from 0 (default yellow) to 5 (dark).

    0 | 1 | 2 | 3 | 4 | 5
  • defaultSkinTone

    Starting skin tone when uncontrolled. Defaults to 0.

    0 | 1 | 2 | 3 | 4 | 5

    Default 0

  • onSkinToneChange

    Called with the new tone when the user picks a skin tone.

    ((tone: SkinTone) => void)
  • recentStorageKey

    localStorage key for recent emoji; pass null to keep them in memory.

    string | null

    Default beui-pro-emoji-recent

  • columns

    Emojis per grid row; also sets the picker width. Defaults to 8.

    number

    Default 8

  • autoFocus

    Focus the search field on mount.

    boolean

    Default true

  • labels

    Overrides for the search, status, and accessibility text.

    Partial<EmojiPickerLabels>
  • className

    Classes merged onto the root element.

    string
Types2 types

The object types these props take, field by field.

Emoji7 fields
  • idRequired

    Unicode hexcode, stable across skin tones.

    string
  • charRequired

    Emoji character in the default skin tone.

    string
  • labelRequired

    Name shown in the preview bar and used for search.

    string
  • tagsRequired

    Extra search keywords, matched by prefix.

    string[]
  • groupRequired

    Emojibase group number that places it in a category.

    number
  • versionRequired

    Unicode emoji version the glyph shipped in.

    number
  • skins

    Characters for tones 1–5, when the emoji supports them.

    Partial<Record<Exclude<SkinTone, 0>, string>>
EmojiPickerLabels6 fields
  • searchRequired

    Search field placeholder and accessible label.

    string
  • skinToneRequired

    Accessible label for the skin tone switcher.

    string
  • noResultsRequired

    Builds the empty-state message from the trimmed search query.

    (query: string) => string
  • resultsRequired

    Builds the search results header from the match count.

    (count: number) => string
  • loadingRequired

    Accessible label for the placeholder grid while emoji load.

    string
  • pickRequired

    Grid label and preview bar text before an emoji is hovered.

    string