Add customer feedback to your Next.js app
Put a shadcn/ui button next to the feature or AI answer your customer wants to flag. Feeduna attaches that reference so your team can review the report and send it to Linear.
Attach the feature or answer
Use a stable feature ID, such as reports.export. The button loads the widget when you pass your project ID. If the same app’s layout already loads the widget, you can omit that prop.
import { FeedunaFeedbackButton } from "@/components/feeduna-feedback-button";
<FeedunaFeedbackButton
projectId="YOUR_PROJECT_ID"
target={{ type: "feature", id: "reports.export", label: "Export CSV" }}
>
Give feedback on export
</FeedunaFeedbackButton>For an AI answer, use the saved version ID your app displayed. Pass a new version ID when you regenerate the answer. If you can reopen a saved version, set target.path to that route behind your app’s access controls.
import { FeedunaFeedbackButton } from "@/components/feeduna-feedback-button";
<FeedunaFeedbackButton
projectId="YOUR_PROJECT_ID"
target={{
type: "data_result", collection: "ai.answers",
id: displayedAnswerVersionId, label: "AI answer",
}}
>
Report this answer
</FeedunaFeedbackButton>For a configured AI answer example, open App setup with the answer example or open the example in v0 .
Check the first report
- Open the page where you added the button. To try it locally, register your dev origin, including its port.
- Click the button and check the attached feature or answer reference. Confirm the connection with Check widget on your site in App setup.
- When collection is enabled, send a test report. Open it in Feeduna, check the reference, then review the issue before sending it to Linear.
If the button can’t connect, check the exact origin and widget settings.