nuxt-emoji

An Emoji component for your Nuxt 3 project.
7,980 33
Install
npm install nuxt-emoji
Latest Version:1.0.2
Vue:3
License:ISC
Last Updated:Jun 24, 2024
Links: GitHub  ·  npm
Maintainer: tim103

Nuxt 3 Emoji Picker Component

An Emoji picker component for your Nuxt 3 project.

  • ✅ Slot for a custom button
  • 🔧 Props for theme, placement etc
  • 🍪 Saves recently used into a cookie
  • 🗨 Uses Tippy js to display picker (vue-tippy)

Open the playground on StackBlitz.

Nuxt Emoji

Usage

Install the layer:

npm i -D nuxt-emoji

Add the layer in the extends array in nuxt.config.ts:

export default defineNuxtConfig({
  extends: ['nuxt-emoji'],
})

Now you can use the emoji picker component anywhere in your project:

<template>
  <!-- Basic Usage -->
  <NuxtEmoji @on-select="select" />

  <!-- With Props -->
  <NuxtEmoji @on-select="select" :theme="light" :placement="bottom" />

  <!-- With Custom Button -->
  <NuxtEmoji @on-select="select">
    <template v-slot:button>
      <button>Custom Button 😁</button>
    </template>
  </NuxtEmoji>
</template>

<script setup>
function select(emoji) {
  // do something with your emoji
}
</script>

Events

on-select

When the user clicks an emoji, we fire an on-select event that contains the emoji so you can do something with it.

Slots

button

You can pass in a custom button using a button named slot. This will be the button that launches the component when clicked.

Props

You can pass props to the component to change the style & placement. We'll continue to add on this as requested.

placement

Where the tippy popup showing the emoji picker will show. Options are:

  • top-start

  • top-end

  • right

  • right-start

  • right-end

  • bottom

  • bottom-start

  • bottom-end

  • left

  • left-start

  • left-end

  • auto

  • auto-start

  • auto-end


Theme

The main theme of component. Only options are light (default) and dark

Related Packages

@scayle/storefront-nuxt

Nuxt integration for the SCAYLE Commerce Engine and Storefront API

152,903
nuxt-tsconfig-stub

Stub Nuxt's generated tsconfig.json at installation

70,835 24
kuranuxt

Look at the Nuxt 3 documentation to learn more.

871 0
nuxt-define

One utility function for module authors to define compiler constants for all bui...

13,412,511
dayjs-nuxt

Day.JS Module for Nuxt

1,986,864 126

Version History

Version Released Vue License
1.0.2 ^3.0 ISC
1.0.1 ISC
1.0.0 ISC