Browse the docs
Getting started

Widget customization

Out of the box the widget takes on your site’s look. Everything else is optional: where it appears, who the reporter is, which language it speaks, and how far you style or replace it.

It matches your site

When it loads, the widget reads your page: the background and text colours, the font, the colour and shape of your main buttons, the corners of your fields, and whether the page is light or dark. It builds its own look from that, checks contrast so text stays readable, and follows your site when it switches theme.

Projects → Widget shows what was detected and previews the widget on your homepage. Choose Custom there to pick the colour, theme, font and corners yourself, or set data-style="custom" on the script tag.

Content Security Policy

If your site uses a CSP nonce, put the same per-response nonce on the widget script. The loader carries it to the widget’s base and theme styles and to the replay recorder. Generate a fresh nonce on your server for each response; the value below is a placeholder.

<script nonce="YOUR_RESPONSE_NONCE" src="https://api.feedback.mom/widget.js" data-key="pk_live_..."></script>

Allow the widget API origin in script-src for the core module, lazy chunks and recorder, and in connect-src for report submission. Allow your project’s exact upload storage origin in connect-src; use the hostname returned by its attachment presign response. Screenshot previews need data: and blob: in img-src. Keep your nonce requirement in style-src. A different or missing nonce remains blocked.

For a JavaScript installation you can also pass cspNonce to FeedbackMom.init. Your site’s consent manager must separately permit the chosen feedback and evidence destinations; a CSP allowance does not grant visitor consent. Replay begins when selected and stops after submission or closing the form.

Where it appears

By default a launcher button sits in a corner. It lives in the browser’s top layer, so headers, cookie banners and chat bubbles can’t cover it. On phones the form opens as a bottom sheet.

Open it from your own UI instead, such as a “Report a problem” item in your help menu:

<script src="https://api.feedback.mom/widget.js" data-key="pk_live_..." data-hide-launcher="true"></script>

<a href="#" data-verity-open>Report a problem</a>
<button data-verity-open="qa">Send a QA report</button>

Or from code, for elements you render later:

FeedbackMom.attachTo("#help-report", { entryVariant: "feedback" });
FeedbackMom.open();

To put the form inside a page, such as your support page:

<div data-verity-inline></div>
<!-- or -->
FeedbackMom.mount(document.querySelector("#support-form"));

To show the button only on some pages, set Projects → Widget → Show the button on. Paths like /app/* match everything under /app; single-page navigation is followed. On other pages the button is hidden, and your own data-verity-open links still work.

Your signed-in users

Pass the user you already know. Their email fills itself in, the email field disappears, and your team sees who sent the report. Reporter details are never shared with coding agents.

FeedbackMom.init({ user: { id: "u_42", email: "[email protected]", name: "Maya" } });

Without a user, the form asks for an email only when the project’s email setting does.

Anyone could pass any email, so reports show the reporter as not verified unless your server signs the user. Turn on verification in Projects → Install to get an identity secret, then add a hash made on your server:

// Server
const hash = crypto.createHmac("sha256", process.env.VERITY_IDENTITY_SECRET).update(user.id).digest("hex");

// Page
FeedbackMom.init({ user: { id: user.id, email: user.email, name: user.name, hash } });

Sign the email instead when you don’t pass an id.

Details from your app

Attach details your team needs with every report, such as the app version, plan or feature flags. They show in the report, in GitHub, Linear and Jira issues, and for coding agents. Up to 30 keys; values are text, numbers or true/false, up to 200 characters.

FeedbackMom.init({ metadata: { appVersion: "4.12.0", plan: "pro", newCheckout: true } });

Offer a report after an error

Turn on Offer a report after an error under Projects → Appearance → Behavior (or data-error-prompt="true"). When a JavaScript error happens on your page, the widget asks “Tell us what you were doing?”, at most once per visit, and the report includes the error.

Language

The widget speaks English, Swedish, German, French, Spanish, Dutch and Portuguese. It follows your page’s <html lang>, then the visitor’s browser. Set it explicitly, or replace any wording:

FeedbackMom.init({ locale: "sv", messages: { send: "Skicka in", "title.feedback": "Rapportera ett fel" } });

Style it yourself

The widget is isolated from your CSS, so your styles can’t break it by accident. To change it on purpose, set these variables on it; they win over both the matched and the configured look.

[data-feedback-widget] {
  --verity-accent: #e11d48;
  --verity-radius: 4px;
  --verity-font: "Inter", sans-serif;
}
[data-feedback-widget]::part(panel) {
  border-width: 2px;
}
--verity-accent
Buttons and highlights
--verity-accent-text
Text on the accent colour
--verity-background
Panel background
--verity-text
Text
--verity-muted
Secondary text
--verity-border
Borders and dividers
--verity-radius
Panel corners
--verity-control-radius
Fields and small buttons
--verity-launcher-radius
Launcher corners
--verity-font
Font family
--verity-shadow
Panel shadow
--verity-z-index
Stacking, in browsers without the top layer

Parts for ::part(): launcher, panel, header, close-button, textarea, input, screenshot-button, primary-button, footer, editor, error-prompt.

Your own form (headless)

Keep your design system and still get the evidence: Verity captures the screenshot, the page, the browser, the steps and the errors, within the project’s policy.

const { reportId } = await FeedbackMom.submit({
  message: "Export button stays grey",
  type: "bug",              // "bug" | "suggestion" | "other"
  email: "[email protected]",   // optional
  screenshot: true          // capture this page, or pass a Blob
});

const image = await FeedbackMom.captureScreenshot(); // a Blob to preview in your form

React

import { VerityProvider, VerityInline, useVerity } from "@feedbackr/react";

<VerityProvider publishableKey="pk_live_..." user={currentUser} hideLauncher>
  <App />
</VerityProvider>

function HelpMenu() {
  const verity = useVerity();
  return <button onClick={() => verity.open()}>Report a problem</button>;
}

useVerity() also gives submit and captureScreenshot; <VerityInline /> renders the form in place.

Loading

widget.js is a 1 KB loader. It records console errors and failed requests from the start, and loads the launcher and telemetry (about 23 KB compressed). The form loads when the browser is idle or the visitor reaches for the button; the screenshot code loads only when someone takes one. Calls made before everything has loaded are queued.

Override order

  1. 1. CSS variables on the widget
  2. 2. FeedbackMom.init(...) options
  3. 3. Script tag attributes (data-*)
  4. 4. Project settings in the admin (Custom style), or what was detected on your site (Match my site)
  5. 5. Widget defaults

Script tag reference

<script
  src="https://api.feedback.mom/widget.js"
  data-key="pk_live_..."          required
  data-env="prod"
  data-style="site | custom"
  data-hide-launcher="true"
  data-locale="sv"
  data-error-prompt="true"
  data-button-text="Feedback"
  data-launcher="pill | bubble | chip | side_tab"
  data-position="bottom-right | bottom-left | center-right | center-left"
  data-primary="#0f766e"
  data-mode="light | dark | auto"
></script>