Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 1,000,000+ packages pre-installed, including vue-twemoji with all npm packages installed. Try it out:

require("vue/package.json"); // vue is a peer dependency. var vueTwemoji = require("vue-twemoji")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

vue-twemoji v1.0.1

twemoji for vue


import twemoji to vue ref:

How to install:

npm install --save vue-twemoji

And in your entry file:

import Vue from 'vue'
import vuetwemoji from 'vue-twemoji'

Vue.use(vuetwemoji, [config])

config options

  baseUrl: '/assets/image/emoji/', //can set to local folder of emojis. default:
  extension: '.png', //.svg, .png
  className: 'emoji', //custom className for image output
  size: '36x36' //image size


  <div v-html="outHtml"></div>
  <input type="text" v-model="text" @change="parseEmoji(text)" />
  return {
    text: 'I \u2764\uFE0F emoji!',
    outHtml: null
  parseEmoji: function (string) {
    let self = this
    this.outHtml = this.$twemoji.parse(string, function (emoji, options) {
      return options.base + emoji + options.extension

save as twemoji parse function ref: codepen example:

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free