Ybug-vue
A simple Vue 3 wrapper for Ybug's Feedback Widget API.
Installation
npm install --save ybug-vue
Setup
Install the plugin. You can use any setting mentioned in the documentation.
import { createApp } from 'vue';
import Ybug from 'ybug-vue';
const app = createApp({});
app.use(Ybug, {
id: 'Your Project ID goes here',
/* optional options */
settings: {
language_override: 'cs',
/* ... */
}
});
Usage
You can use any method mentioned in the official documentation.
Usage with Composition API
You can inject('ybug')
in your Composition API components.
<script setup>
import { inject } from "vue";
const ybug = inject("ybug");
</script>
<template>
<button @click="ybug.open('feedback')">Feedback</button>
</template>
Usage with Options API
ybug-vue
plugin exposes $ybug
object in components using the Options API.
<template>
<button @click="$ybug.open('feedback')">Feedback</button>
</template>