Skip to content
Feeblo Docs
Esc
↑↓navigate↵open⌘Jpreview
On this page

Quickstart

Install the @feeblo/sdk widget SDK (or @feeblo/sdk-react), mount the widget, add a trigger, and identify the user.

Install the SDK, mount the widget, add a trigger, and identify the user. Each step produces something you can see in the browser.

Install

npm install @feeblo/sdk
npm install @feeblo/sdk @feeblo/sdk-react

Both packages ship ESM and UMD builds with no runtime dependencies. @feeblo/sdk-react depends on @feeblo/sdk and re-exports its API, so installing the React package also installs the core SDK.

Mount the widget

Call init with your Feeblo organization ID:

import { Feeblo } from "@feeblo/sdk";

const widget = Feeblo.init("org_123");

init returns a chainable handle, so you can keep configuring it:

const widget = Feeblo.init("org_123").setBoard("roadmap");

Wrap your app in FeebloProvider. It mounts the widget and hands control to its hooks:

import { FeebloProvider } from "@feeblo/sdk-react";

<FeebloProvider organizationId="org_123">
  <App />
</FeebloProvider>

Config props like organizationId, mode, theme, and placement recreate the underlying widget when they change, so treat them as configuration rather than state.

Add a trigger

Give any element the data-feeblo-feedback attribute. The SDK scans for these elements and opens the widget when a user clicks one:

<button data-feeblo-feedback>Give feedback</button>

This works the same in React, since scanning happens at the DOM level. For programmatic control:

widget.open();
import { useFeeblo } from "@feeblo/sdk-react";

function FeedbackButton() {
  const feeblo = useFeeblo();

  return <button onClick={() => feeblo.open()}>Give feedback</button>;
}

useFeeblo also exposes close, setBoard, openModule, metadata, identify, plus reactive isOpen and isReady values. It throws outside a provider.

Identify the user

Attach a user to each piece of feedback:

Feeblo.identify({
  id: "u_1",
  email: "ada@example.com",
  name: "Ada Lovelace",
});

Pass the identity as the user prop. Changes call identify on the live widget without recreating it:

<FeebloProvider organizationId="org_123" user={currentUser}>
  <App />
</FeebloProvider>

Only id is required. Anonymous submissions work fine. Add a signed token when you want posts tied to a verified identity. Identifying users covers the identity object and custom fields, Widget SSO covers signing.

Widget modes

mode picks the widget’s entry page. feedback (the default) opens the submit form, updates opens a product updates panel, and hub puts several modules behind one launcher. The array order decides which module shows first:

const hub = Feeblo.init("org_123", {
  mode: "hub",
  modules: ["updates", "feedback"],
});

hub.openModule("feedback");

In React, set mode and modules on FeebloProvider instead.

Widget configuration documents every mode and option, including placement for the built-in launcher.

Next steps

Was this page helpful?