Install: React

Add the feedback widget
to a React app.

Mount the provider once. Then any component can open the widget, switch boards, and read whether it is open. React 19 or newer is required.

One provider Typed hooks StrictMode safe
React setup
@feeblo/sdk-react
npm install @feeblo/sdk @feeblo/sdk-react

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

const feeblo = useFeeblo();
feeblo.open();
Providermounts the widget
useFeebloopen, close, setBoard
useFeebloEventwidget event hooks

Two exports cover most apps: the provider and the hook.

Prerequisites

Before you start

React 19 or newer

The React package declares react and react-dom ^19.0.0 as peer dependencies. On React 18, use the core SDK and mount it in an effect.

Your organization ID

Copy it from Settings → Widget → Installation. FeebloProvider takes it as a required organizationId prop.

A board for posts

The feedback module submits to a board. Pick one with defaultBoard, or switch boards at runtime with setBoard.

A token for verified posts

Optional. To attach posts to a confirmed identity, mint a JWT on your server and pass it as token on the user prop.

Steps

Mount the provider and open the widget

Follow the steps in order. Each one leaves the app in a state you can check in the browser.

  1. 1

    Install the React package

    Install both packages. @feeblo/sdk-react depends on @feeblo/sdk and re-exports its API, so every import in this guide can come from the React package.

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

    Wrap your app in FeebloProvider

    Render the provider once, above every component that opens the widget. It initializes the widget on mount and destroys it on unmount, including StrictMode double mounts.

    App.tsx
    import { FeebloProvider } from "@feeblo/sdk-react";
    
    export function App() {
      return (
        <FeebloProvider organizationId="org_123" placement="bottom-right">
          <FeedbackButton />
        </FeebloProvider>
      );
    }
  3. 3

    Open the widget from a button

    Call useFeeblo in any component below the provider. The hook returns open, close, openModule, setBoard, identify, metadata, plus reactive isOpen and isReady values.

    FeedbackButton.tsx
    import { useFeeblo } from "@feeblo/sdk-react";
    
    export function FeedbackButton() {
      const feeblo = useFeeblo();
    
      return (
        <button type="button" onClick={() => feeblo.open()}>
          {feeblo.isOpen ? "Close feedback" : "Give feedback"}
        </button>
      );
    }
  4. 4

    Pass the signed-in user

    The user prop identifies the current user. A new object calls identify on the live widget without recreating it.

    App.tsx
    <FeebloProvider
      organizationId="org_123"
      user={{ id: user.id, email: user.email, name: user.name }}
    >
      <App />
    </FeebloProvider>
  5. 5

    Track submissions

    useFeebloEvent subscribes for the lifetime of the component. Write the handler inline: the hook reads it through a ref, so a new closure on each render never resubscribes.

    FeedbackAnalytics.tsx
    import { useFeebloEvent } from "@feeblo/sdk-react";
    
    export function FeedbackAnalytics() {
      useFeebloEvent("feedbackSubmitted", (event) => {
        console.log(event.detail.data);
      });
    
      return null;
    }
  6. 6

    Switch modules or boards

    The hook exposes openModule and setBoard for later interactions. openModule only switches to modules the current config enables.

    Component.tsx
    const feeblo = useFeeblo();
    
    feeblo.openModule("updates");
    feeblo.setBoard("roadmap");
  7. 7

    Handle errors and height changes

    onError receives an EmbedError with a stable code and message. onHeightChange reports the iframe height whenever it changes. Both are read through refs, so inline closures are safe.

    App.tsx
    <FeebloProvider
      organizationId="org_123"
      onError={(error) => {
        console.warn(error.code, error.message);
      }}
      onHeightChange={(height) => {
        setWidgetHeight(height);
      }}
    >
      <App />
    </FeebloProvider>
  8. 8

    Confirm the widget loaded

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

    App.tsx
    <FeebloProvider organizationId="org_123" debug>
      <App />
    </FeebloProvider>

Result

What you should see

A launcher in the corner

The placement prop renders a launcher 20px from the bottom corner you picked. Omit it and nothing shows until a trigger or feeblo.open() runs.

isOpen follows the widget

Clicking the button opens the widget and flips isOpen to true. Closing it with Escape, an outside click, or the widget's own close button flips it back.

Posts carry the user

A submission from an identified user lands on the board with that name and email. Only id is required, so an email is optional.

Events reach your handler

feedbackSubmitted fires with the board, the post title, and any trigger metadata. The hook removes the listener when the component unmounts.

What each prop does

Config props recreate the widget. The user prop does not. Callbacks are read through refs.

organizationId, mode, modules
Tears down the widget and mounts a new one.
placement, theme, locale, defaultBoard, debug, baseUrl, containerStyles
Same: a new value recreates the widget.
user
Calls identify on the live widget. No remount.
onClose, onError, onHeightChange
Read through refs. Inline closures are safe.

Common problems

These four account for most React installs that load but do not behave.

useFeeblo throws

The component sits outside the provider. The error reads: [feeblo-sdk-react] useFeeblo must be used inside a <FeebloProvider>.

The widget remounts on navigation

The provider is mounted inside a route component, so it unmounts with the route. Move it to the layout above your routes.

The widget has the wrong user

Setting user back to undefined does not sign anyone out. The SDK has no clear-identity API, so the last identity stays until another identify call or a provider remount.

Two widgets open at once

One page, one integration path. A provider plus the CDN script tag creates two SDK instances that fight over the same container.

Mount it once, above your routes

The provider owns the widget instance. Where you mount it decides how long the widget lives.

  • Put the provider in your root layout or App component so it survives navigation.
  • Keep one provider per page. Two providers mean two SDK instances and a split event stream.
  • Drive the user prop from state. Everything else is configuration you set once.

Plain triggers still work

The provider binds DOM triggers as well as hooks. A button with data-feeblo-feedback opens the widget the provider mounted, so you can drop one into a component you do not want to touch.

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

The extra attribute arrives as metadata on the post and in the feedbackSubmitted event.

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.