Pullwish Docs
SDKs

@pullwish/feature-reporter

Embeddable feedback widget for feature requests and bug reports.

@pullwish/feature-reporter

Installation

npm install @pullwish/feature-reporter

Features

  • Embeddable floating widget button
  • Feature request submission form
  • Bug report submission form
  • Automatic metadata collection (URL, user agent, timestamp, screen resolution)
  • User information association
  • 6 positions and 6 icons
  • Draggable widget option
  • Custom labels for every text string
  • TypeScript support
  • Zero runtime dependencies
  • Mobile-responsive

Configuration options

OptionTypeRequiredDescription
apiKeystringYesAPI key with features:write (feature requests) and bugs:write (bug reports) permissions
projectIdstringYesYour project ID
apiUrlstringNoBase URL (origin only, no path). Default: https://www.pullwish.com. The widget posts to {apiUrl}/api/public/v1/features and {apiUrl}/api/public/v1/bugs
positionWidgetPositionNoWidget position. Default: bottom-right
colorWidgetColorNoOptional. Default: blue
iconWidgetIconNoWidget button icon. Default: comment
draggablebooleanNoAllow the user to drag the widget. Default: false
enableFeatureRequestsbooleanNoShow the feature request form. Default: true
enableBugReportsbooleanNoShow the bug report form. Default: true
showDashboardLinkbooleanNoShow a link to the public project board ({apiUrl}/projects/{projectId}) in the modal footer. Default: false
user{ id?, email?, name? }NoPre-fill user information (hides the email field when email is set)
labelsFeatureReporterConfig['labels']NoOverride default form labels and toast text
onSubmit(type, data) => voidNoCalled after successful submission
onError(error) => voidNoCalled on submission errors

Widget positions

bottom-right, bottom-left, top-right, top-left, right-center, left-center

Icons

comment, lightbulb, bug, message, plus, star

Basic usage

import { FeatureReporter } from '@pullwish/feature-reporter';

const reporter = new FeatureReporter({
  apiKey: 'ft_live_your_api_key_here',
  projectId: 'your-project-id',
  position: 'bottom-right',
  user: {
    id: 'usr_123',
    email: 'user@example.com',
  },
});

reporter.init();

React integration

'use client';

import { useEffect } from 'react';
import { FeatureReporter } from '@pullwish/feature-reporter';

export function FeatureReporterProvider() {
  useEffect(() => {
    const reporter = new FeatureReporter({
      apiKey: process.env.NEXT_PUBLIC_PULLWISH_API_KEY!,
      projectId: process.env.NEXT_PUBLIC_PULLWISH_PROJECT_ID!,
      position: 'bottom-right',
    });

    reporter.init();

    return () => {
      reporter.destroy();
    };
  }, []);

  return null;
}

API methods

MethodDescription
init()Initialize and mount the widget into the DOM
setUser(userId, email?, name?)Update the associated user
show()Programmatically show the widget button
hide()Programmatically hide the widget button and close the modal
destroy()Remove the widget and modal from the DOM

TypeScript exports

FeatureReporter (default), FeatureReporterConfig, SubmissionData, WidgetPosition, WidgetColor, WidgetIcon