Featurely Docs
SDKs

featurely-feature-reporter

Embeddable feedback widget for feature requests and bug reports.

featurely-feature-reporter

Installation

npm install featurely-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, 6 colors, 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 permission
projectIdstringYesYour project ID
apiUrlstringNoCustom API endpoint
positionWidgetPositionNoWidget position. Default: bottom-right
colorWidgetColorNoWidget accent color. 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 roadmap 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

Colors

blue, green, purple, red, orange, pink

Icons

comment, lightbulb, bug, message, plus, star

Basic usage

import { FeatureReporter } from 'featurely-feature-reporter';

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

reporter.init();

React integration

'use client';

import { useEffect } from 'react';
import { FeatureReporter } from 'featurely-feature-reporter';

export function FeatureReporterProvider() {
  useEffect(() => {
    const reporter = new FeatureReporter({
      apiKey: process.env.NEXT_PUBLIC_FEATURELY_API_KEY!,
      projectId: process.env.NEXT_PUBLIC_FEATURELY_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