Home

Awesome

vuemoji-picker

A simple Vue 2 and 3 wrapper component for emoji-picker-element.

Live Demo

Demo of vuemoji-picker

Install

npm install vuemoji-picker

Usage

<script setup lang="ts">
import { VuemojiPicker, EmojiClickEventDetail } from 'vuemoji-picker'

const handleEmojiClick = (detail: EmojiClickEventDetail) => {}
</script>

<template>
    <VuemojiPicker @emojiClick="handleEmojiClick" />
</template>

Props

NameTypeDefaultDescription
isDarkBooleansystemSet picker theme
customCategorySortingFunction-Function to sort custom category strings (sorted alphabetically by default)
customEmojiCustomEmoji[]-Array of custom emoji
dataSourceString"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/en/emojibase/data.json"URL to fetch the emoji data from
i18nI18n-i18n object (see details)
localeString"en"Locale string
skinToneEmojiString"🖐️"The emoji to use for the skin tone picker
pickerStyleVuemojiPickerStyle-style object (see available options)

Events

NameTypeDefaultDescription
emojiClickFunction-Fired when an emoji is selected
skinToneChangeFunction-Fired when a new skin tone is selected

Composables

Set of composables that wraps Database API methods.

<script setup>
import { ref } from 'vue'
import {
  useEmojiByGroup,
  useEmojiBySearchQuery,
  useEmojiByShortcode,
  useEmojiByUnicodeOrName
} from 'vuemoji-picker'

const query = ref('elephant')
const { result, loading } = useEmojiBySearchQuery(query)
</script>

For more information about available styling and offline config, please read emoji-picker-element's docs.

License

MIT - Copyright (c) 2021 Robert Soriano