Overview

The official NPM module for embedding the Userback Widget into your Vue application.

Official NPM Package

https://www.npmjs.com/package/@userback/vue

Official Github Repository

https://github.com/userback/widget-js/tree/develop/widget-vue

Installation

📘

Userback Widget Token

You will need your Userback Widget Token, you can get your project-specific Userback Widget Token from Widget Customiser.

We've got 2 options, utilizing NPM or Yarn in the code example below.

npm i @userback/vue
yarn add @userback/vue

Quickstart

To setup the plugin simply use App.use to install Userback into the global scope under $userback

import UserbackPlugin from '@userback/vue'

createApp(App)
    .use(UserbackPlugin, { token: USERBACK_TOKEN })
    .mount('#app')

The $userback API can now be used throughout your application:

<template>
  <button type="button" @click="$userback.show()">Show</button>
  <button type="button" @click="$userback.hide()">Hide</button>

  <button type="button" @click="$userback.open('bug')">Open Bugs</button>
  <button type="button" @click="$userback.open('general', 'screenshot')">Screenshot me!</button>
</template>

For more information about available configuration settings and functions available, see our JavaScript API