Install: Vue

Add the feedback widget
to a Vue app.

The core SDK has no framework dependency, so a Vue component mounts it with two lifecycle hooks. Initialize in onMounted, destroy in onBeforeUnmount, and keep the handle in a plain variable.

No framework wrapper SSR-safe init DOM triggers work
FeedbackWidget.vue
@feeblo/sdk
npm install @feeblo/sdk

onMounted(() => {
  widget = Feeblo.init("org_123", {
    placement: "bottom-right",
  });
});

onBeforeUnmount(() => {
  widget?.destroy();
});
onMountedinit in the browser only
widget.open()from your own button
onBeforeUnmountdestroy and unsubscribe

Two hooks and one import. The widget does the rest.

Prerequisites

Before you start

A Vue 3 project

The examples use script setup and the Composition API. Options API components can call the same functions from mounted and beforeUnmount.

No Vue package

feeblo publishes @feeblo/sdk and @feeblo/sdk-react. There is no Vue package. The core SDK has no framework dependency, so a Vue component imports it directly.

Your organization ID

Copy it from Settings → Widget → Installation. Feeblo.init takes it as the first argument.

Your board and user

Posts submit to a board, so pick one with defaultBoard. Have the signed-in user's id ready to identify them.

Steps

Mount the widget from a component

Each step adds one piece to the same component. Run them in order and refresh the page after each one.

  1. 1

    Install the core SDK

    Add the framework-free package. It ships an ESM build and a UMD build, and it has no runtime dependencies.

    Terminal
    npm install @feeblo/sdk
  2. 2

    Initialize the widget in onMounted

    Mount the widget once inside the component. The onMounted hook runs only in the browser, so the SDK never touches document during server rendering.

    FeedbackWidget.vue
    <script setup lang="ts">
    import { Feeblo } from "@feeblo/sdk";
    import { onBeforeUnmount, onMounted } from "vue";
    
    let widget: ReturnType<typeof Feeblo.init>;
    
    onMounted(() => {
      widget = Feeblo.init("org_123", { placement: "bottom-right" });
    });
    
    onBeforeUnmount(() => {
      widget?.destroy();
    });
    </script>
  3. 3

    Open the widget from a button

    Call open on the handle from a template handler. The handle is a plain variable, not a ref, because it is not UI state.

    FeedbackWidget.vue
    <script setup lang="ts">
    import { Feeblo } from "@feeblo/sdk";
    import { onBeforeUnmount, onMounted } from "vue";
    
    let widget: ReturnType<typeof Feeblo.init>;
    
    onMounted(() => {
      widget = Feeblo.init("org_123");
    });
    
    function openFeedback() {
      widget?.open();
    }
    
    onBeforeUnmount(() => {
      widget?.destroy();
    });
    </script>
    
    <template>
      <button type="button" @click="openFeedback">Give feedback</button>
    </template>
  4. 4

    Identify the user

    Send the user after the widget loads. Call identify again whenever the user's details change. Only id is required.

    FeedbackWidget.vue
    onMounted(() => {
      widget = Feeblo.init("org_123");
    
      Feeblo.identify({
        id: user.id,
        email: user.email,
        name: user.name,
      });
    });
  5. 5

    Subscribe to widget events

    on returns an unsubscribe function. Store it and call it before unmount so the listener does not outlive the component.

    FeedbackWidget.vue
    import { Feeblo } from "@feeblo/sdk";
    import { onBeforeUnmount, onMounted } from "vue";
    
    let off: (() => void) | undefined;
    
    onMounted(() => {
      off = Feeblo.on("feedbackSubmitted", (event) => {
        console.log(event.detail.data);
      });
    });
    
    onBeforeUnmount(() => {
      off?.();
    });
  6. 6

    Or use a plain DOM trigger

    The SDK scans the page for data-feeblo-feedback elements, so a template button needs no handler at all.

    FeedbackWidget.vue
    <template>
      <button data-feeblo-feedback data-feeblo-board="roadmap">
        Give feedback
      </button>
    </template>
  7. 7

    Confirm the widget loaded

    Add debug for the first run. The SDK logs a banner with the org ID and base URL, then trigger bindings and events.

    FeedbackWidget.vue
    onMounted(() => {
      widget = Feeblo.init("org_123", {
        placement: "bottom-right",
        debug: true,
      });
    });

Result

What you should see

A launcher in the corner

The placement option renders a launcher 20px from the bottom corner you picked. Leave it out and open the widget from your own button.

An overlay over the app

Clicking the button opens the widget in an iframe over the page. Your router does not navigate, and the page behind it stays put.

Identity on the post

A submission lands on the board with the id, email, and name you sent through identify.

Clean teardown

When the component unmounts, destroy removes the iframe, the launcher, and the listeners the SDK registered.

Send a signed token

An identify call without a token can be faked from the browser console. Sign a JWT on your server with your organization secret and pass it as token. Feeblo verifies it and attaches the post to a real contact.

Keep the token short-lived. Mint a fresh one per page render or session, then pass it into the component as a prop. The secret never leaves the server.

Widget SSO claims and signing
FeedbackWidget.vue
Feeblo.identify({
  id: user.id,
  email: user.email,
  name: user.name,
  token, // signed on your server
});

Only id is required. Email, name, and token are optional, and the token is what makes the identity trustworthy.

Vue rules that matter

The SDK is not reactive. Treat it as a browser resource with a lifecycle.

Init in onMounted, never at module scope

Module scope runs during server rendering, where window and document do not exist.

Keep the handle in a plain let

The widget is not reactive state. A ref would proxy an object your template never renders.

Destroy on unmount

The SDK keeps one global widget instance. destroy releases the iframe and the listener set.

Unsubscribe your listeners

Feeblo.on returns a function. Call it so a listener from an old component cannot fire.

One instance per page

The SDK keeps a single global widget, so init belongs in one long-lived component, not in every view.

Markup triggers work anywhere

Any element with data-feeblo-feedback opens the widget, including elements outside the component tree.

Common problems

These four are about where the code runs, not about the widget.

document is not defined

Feeblo.init ran at module scope or during SSR. Move the call into onMounted.

Two widgets appear

The component is mounted twice, for example in a layout and a page. Mount it once above your routes.

The button does nothing

The handler ran before onMounted assigned the handle, or the package did not load. Log widget to check.

The widget survives navigation

onBeforeUnmount did not call destroy, so the iframe outlived its component. Add the cleanup.

Where to go next

The widget options, the identity object, and the signed token are the same in every framework. Only the mounting code changes. If you move to React later, the provider wraps the same calls.

A template trigger, no handler

The SDK rescans the page for triggers every second, so a button rendered by v-if or v-for binds after it appears.

<button data-feeblo-feedback data-feeblo-plan="pro">
  Give feedback
</button>

Start building what your users want

Open-source feedback boards, roadmaps, and changelogs. Self-host in minutes or start on the cloud, and close the loop with every release.