Visual feedback that turns into code. Embed the feedback widget into any project, collect annotated bug reports with full browser context, and ship fixes faster.
Create a project on the dashboard, get your SDK token, and embed the feedback toolbar. No build tool changes needed — the SDK works with any host framework.
sdkToken.Install the @feedback/sdk package and mount the FeedbackToolbar component.
npm install @feedback/sdk'use client';
import { FeedbackToolbar } from '@feedback/sdk';
export default function RootLayout({ children }) {
return (
<html>
<body>
{children}
<FeedbackToolbar
projectToken="YOUR_SDK_TOKEN"
serverUrl={process.env.NEXT_PUBLIC_FEEDBACK_SERVER_URL}
/>
</body>
</html>
);
}Props:
projectToken (required) — Your project's SDK token from the dashboard.serverUrl (optional) — Defaults to http://localhost:3000 in development. Set to https://server-production-14a9.up.railway.app for production.No React needed. Use the REST API endpoint directly from any page with a simple fetch call. Place this snippet before your closing </body> tag:
<script>
(function () {
var TOKEN = 'YOUR_SDK_TOKEN';
var SERVER = 'https://server-production-14a9.up.railway.app';
var btn = document.createElement('button');
btn.textContent = '💬 Feedback';
btn.style.cssText = 'position:fixed;bottom:24px;right:24px;z-index:9999;padding:12px 20px;border-radius:9999px;border:none;background:#000;color:#fff;font-size:14px;cursor:pointer;box-shadow:0 4px 12px rgba(0,0,0,0.3);';
document.body.appendChild(btn);
btn.addEventListener('click', async function () {
var what = prompt('What should change?');
if (!what) return;
var expected = prompt('Expected behavior:');
try {
var res = await fetch(SERVER + '/api/v1/feedback', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'x-sdk-token': TOKEN,
},
body: JSON.stringify({
url: location.href,
whatToChange: what,
expectedBehavior: expected || '',
pageContext: {
viewport: { width: window.innerWidth, height: window.innerHeight },
userAgent: navigator.userAgent,
},
}),
});
if (res.ok) alert('Thanks for the feedback!');
else alert('Failed to send feedback (code ' + res.status + ')');
} catch (e) {
alert('Network error: ' + e.message);
}
});
})();
</script>The x-sdk-token header can be used as an alternative to Authorization: Bearer. This snippet covers the basic feedback flow; the React SDK additionally captures screenshots, console logs, network logs, and element selection.
When a user submits feedback through the full SDK toolbar, the server captures the following context alongside their description:
| Field | Description |
|---|---|
| whatToChange | User's description of what needs to change |
| expectedBehavior | What the user expected instead |
| screenshotDataUrl | Base64 screenshot of the full page |
| selectedElement | CSS selector, tag, class, and text of the element the user selected |
| pageContext | URL, viewport dimensions, user agent, referrer, session timestamp |
| consoleLogs | Browser console entries (log, warn, error) captured during the session |
| networkLogs | Captured fetch/XHR requests, status codes, and timings |
| annotations | Highlighted regions and arrow annotations the user drew on the screenshot |
| changeType | Category: bug, feature request, UX issue, question, praise, or documentation |
Add 'use client' to any page or layout that imports FeedbackToolbar. Mount it in your root layout so it appears on every page. Set NEXT_PUBLIC_FEEDBACK_SERVER_URL to the production server URL for deployed builds.
Works with any React 18+ setup (Create React App, Vite, Remix). Import FeedbackToolbar and mount as a child of your root component.
Use the fetch-based snippet above. It works in any browser and can be adapted to Vue, Svelte, Angular, or any framework by copying the POST call pattern with the SDK token.
See how feedback looks end-to-end:
/share/<token> — Each submitted feedback item can be shared via a public link (accessible without login)./preview/<projectId> — Preview and test the feedback collection flow for a project in a side-by-side viewer with element selection and annotation tools.