ybug-vue

    1.0.0 • Public • Published

    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>

    Install

    npm i ybug-vue

    DownloadsWeekly Downloads

    14

    Version

    1.0.0

    License

    MIT

    Unpacked Size

    6.34 kB

    Total Files

    5

    Last publish

    Collaborators

    • hernest