<script setup> import { ref } from 'vue'; import { DtEmojiPicker } from '@dialpad/dialtone/vue'; const skinTone = ref('Default'); const selectedEmoji = ref(null); </script> <template> <dt-emoji-picker :skin-tone="skinTone" :recently-used-emojis="[ { name: `thumbs up`, category: `people`, shortname: `:thumbsup:`, shortname_alternates: [`:+1:`, `:thumbsup:`], keywords: [`+1`, `hand`, `thumb`, `up`, `uc6`], unicode_output: `1f44d`, unicode_character: `1f44d`, }, ]" @skin-tone="skinTone = $event" @selected-emoji="selectedEmoji = $event" /> <p v-if="selectedEmoji">Selected: {{ selectedEmoji.name }}</p> </template>
The Vue example initializes the skin tone and shows the selected emoji. The skin-tone event updates the value passed back to the picker.
<dt-popover :open="emojiPickerOpened" initial-focus-element="#searchInput" padding="none" @opened="(open) => { emojiPickerOpened = open }" > <template #anchor> <dt-button aria-label="Choose an emoji" :size="200" circle importance="clear" @click="toggleEmojiPicker" > <template #startIcon> <dt-icon-satisfied size="300" /> </template> </dt-button> </template> <template #content> <dt-emoji-picker :skin-tone="skinTone" :recently-used-emojis="recentlyUsedEmojis" @skin-tone="skinTone = $event" /> </template> </dt-popover>
We recommend to wrap the emoji picker in a dt-popover component.
Tab and search labels are localized by the component. The emoji tab order is fixed.
The 'Most recently used' tab is always first. Update its contents with the recentlyUsedEmojis prop.
The skin-tone prop provided to the component should listen to the skin-tone event emitted by the skin selector button to be updated instantly.
You must listen to the close event to close the emoji picker. This event is emitted by the keyboard navigation on ESC.
For the withPopover variant it is necessary to provide the initial-focus-element="#searchInput" prop to the dt-popover component. With this we accomplish the requirement to have the search input focused when the emoji picker is opened.
The emoji picker starts with the focus on the input search to give the user a quick way to search for an emoji.
When the user searches for an emoji, the first emoji in the list will be highlighted, this allow the user to press ENTER to select this emoji.
From the input search the user can navigate by pressing UP arrow to the tabset or DOWN arrow to the emoji list.
From the tabset it is possible to navigate through the tabs with LEFT and RIGHT arrows, it will jump again to the input search with DOWN arrow.
From the emoji list you can navigate through the first emoji of each emoji tabset with TAB. If you are on the last emoji tabset (flags), it will jump to the skin tone selector. You can navigate through individual emojis and tabsets with the arrow keys.
You can jump to the previous first emoji of the previous emoji tabset with SHIFT + TAB. If you are on the first emoji tabset, it will jump to the input search.
In the skin tone selector the user can press ENTER to open the skin tone selector and select the desired skin tone, you can navigate through with LEFT and RIGHT arrows and select with ENTER. This selection will close the skin tone selector and emit the skin-tone event with the selected skin tone.
From the skin tone selector the user can jump to the tabset selector with TAB button.
This is the following sequence of the keyboard navigation with TAB:
On ESC the emoji picker will emit the close event to close the emoji picker.
import { DtEmojiPicker } from '@dialpad/dialtone-vue';
Name
|
Default
|
Type
|
|---|---|---|
customEmojis | Array The array with custom emojis object
This list is necessary to fill the custom tab | |
recentlyUsedEmojis | [] | Array The array with recently used emoji object
This list is necessary to fill the recently used tab |
searchQuery | '' | String Sets the search query that filters emojis. |
showAddEmojiButton | false | Boolean Shows the add emoji button in the footer when no emoji is highlighted |
showSearch | true | Boolean Shows the search input |
skinTone | 'Default' |
"'Default'"
|
"'Light'"
|
"'MediumLight'"
|
"'Medium'"
|
"'MediumDark'"
|
"'Dark'"
The skin tone to show the emojis
This prop gives the possibility to use the skin tone selected by the user previously |
Name
|
Type
|
|---|---|
add-emoji | Emitted when the user clicks on the add emoji button |
close | Since the keyboard events are encapsulated, we emit this event to close the picker |
scroll-bottom-reached | Emitted when the user reach bottom scroll
This is being handled by handleScroll method |
selected-emoji | It will emit the selected emoji |
skin-tone | It will emit the selected skin tone |
Emoji Picker documentation last updated Friday, November 13, 2026