Emoji Picker
2 variantsA 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>
);
}
Source code is locked
Get access to install premium components and view the full source.
Open dashboardInstall
API Reference
Every prop is optional unless marked required. Data, copy, and colors default to the sample content.
EmojiPicker9 props
onSelectRequiredReceives the emoji character in the chosen skin tone.
(char: string, emoji: Emoji) => voidskinToneControlled skin tone, from 0 (default yellow) to 5 (dark).
0 | 1 | 2 | 3 | 4 | 5defaultSkinToneStarting skin tone when uncontrolled. Defaults to 0.
0 | 1 | 2 | 3 | 4 | 5Default
0onSkinToneChangeCalled with the new tone when the user picks a skin tone.
((tone: SkinTone) => void)recentStorageKeylocalStorage key for recent emoji; pass null to keep them in memory.
string | nullDefault
beui-pro-emoji-recentcolumnsEmojis per grid row; also sets the picker width. Defaults to 8.
numberDefault
8autoFocusFocus the search field on mount.
booleanDefault
truelabelsOverrides for the search, status, and accessibility text.
Partial<EmojiPickerLabels>classNameClasses merged onto the root element.
string
EmojiPickerPopover15 props
onSelectRequiredReceives the emoji character in the chosen skin tone.
(char: string, emoji: Emoji) => voidskinToneControlled skin tone, from 0 (default yellow) to 5 (dark).
0 | 1 | 2 | 3 | 4 | 5defaultSkinToneStarting skin tone when uncontrolled. Defaults to 0.
0 | 1 | 2 | 3 | 4 | 5onSkinToneChangeCalled with the new tone when the user picks a skin tone.
((tone: SkinTone) => void)recentStorageKeylocalStorage key for recent emoji; pass null to keep them in memory.
string | nullcolumnsEmojis per grid row; also sets the picker width. Defaults to 8.
numberautoFocusFocus the search field on mount.
booleanlabelsOverrides for the search, status, and accessibility text.
Partial<EmojiPickerLabels>classNameClasses merged onto the root element.
stringtriggerRequiredThe element that opens the picker, such as a shared Button.
ReactElement<unknown, string | JSXElementConstructor<any>>closeOnSelectClose after an emoji is picked. Defaults to true.
booleanDefault
truesideSide of the trigger the popover opens on. Defaults to top.
"left" | "right" | "top" | "bottom"Default
topalignPopover alignment along the trigger edge. Defaults to start.
"center" | "start" | "end"Default
startopenControlled open state of the popover.
booleanonOpenChangeCalled with the next open state when the popover opens or closes.
((open: boolean) => void)
EmojiReactions6 props
reactionsControlled list of reaction pills, in display order.
readonly Reaction[]defaultReactionsStarting reactions when uncontrolled. Defaults to none.
readonly Reaction[]Default
[]onReactionsChangeCalled with the full updated list when a reaction is toggled or added.
((reactions: Reaction[]) => void)pickerPropsProps passed to the picker, such as a skin tone or storage key.
Omit<EmojiPickerPopoverProps, "onSelect" | "trigger">addLabelAccessible label for the add reaction button.
stringDefault
Add reactionclassNameClasses merged onto the root element.
string
Types3 types
The object types these props take, field by field.
Emoji7 fields
idRequiredUnicode hexcode, stable across skin tones.
stringcharRequiredEmoji character in the default skin tone.
stringlabelRequiredName shown in the preview bar and used for search.
stringtagsRequiredExtra search keywords, matched by prefix.
string[]groupRequiredEmojibase group number that places it in a category.
numberversionRequiredUnicode emoji version the glyph shipped in.
numberskinsCharacters for tones 1–5, when the emoji supports them.
Partial<Record<Exclude<SkinTone, 0>, string>>
EmojiPickerLabels6 fields
searchRequiredSearch field placeholder and accessible label.
stringskinToneRequiredAccessible label for the skin tone switcher.
stringnoResultsRequiredBuilds the empty-state message from the trimmed search query.
(query: string) => stringresultsRequiredBuilds the search results header from the match count.
(count: number) => stringloadingRequiredAccessible label for the placeholder grid while emoji load.
stringpickRequiredGrid label and preview bar text before an emoji is hovered.
string
Reaction3 fields
emojiRequiredEmoji character shown in the pill.
stringcountRequiredNumber of people who reacted with this emoji.
numbermineRequiredWhether 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>
);
}
Source code is locked
Get access to install premium components and view the full source.
Open dashboardInstall
API Reference
Every prop is optional unless marked required. Data, copy, and colors default to the sample content.
EmojiPicker9 props
onSelectRequiredReceives the emoji character in the chosen skin tone.
(char: string, emoji: Emoji) => voidskinToneControlled skin tone, from 0 (default yellow) to 5 (dark).
0 | 1 | 2 | 3 | 4 | 5defaultSkinToneStarting skin tone when uncontrolled. Defaults to 0.
0 | 1 | 2 | 3 | 4 | 5Default
0onSkinToneChangeCalled with the new tone when the user picks a skin tone.
((tone: SkinTone) => void)recentStorageKeylocalStorage key for recent emoji; pass null to keep them in memory.
string | nullDefault
beui-pro-emoji-recentcolumnsEmojis per grid row; also sets the picker width. Defaults to 8.
numberDefault
8autoFocusFocus the search field on mount.
booleanDefault
truelabelsOverrides for the search, status, and accessibility text.
Partial<EmojiPickerLabels>classNameClasses merged onto the root element.
string
Types2 types
The object types these props take, field by field.
Emoji7 fields
idRequiredUnicode hexcode, stable across skin tones.
stringcharRequiredEmoji character in the default skin tone.
stringlabelRequiredName shown in the preview bar and used for search.
stringtagsRequiredExtra search keywords, matched by prefix.
string[]groupRequiredEmojibase group number that places it in a category.
numberversionRequiredUnicode emoji version the glyph shipped in.
numberskinsCharacters for tones 1–5, when the emoji supports them.
Partial<Record<Exclude<SkinTone, 0>, string>>
EmojiPickerLabels6 fields
searchRequiredSearch field placeholder and accessible label.
stringskinToneRequiredAccessible label for the skin tone switcher.
stringnoResultsRequiredBuilds the empty-state message from the trimmed search query.
(query: string) => stringresultsRequiredBuilds the search results header from the match count.
(count: number) => stringloadingRequiredAccessible label for the placeholder grid while emoji load.
stringpickRequiredGrid label and preview bar text before an emoji is hovered.
string