React Component
Add feedback buttons to your React application
The React feedback component adds thumbs up/thumbs down buttons and a feedback popover to collect user feedback about your AI-generated responses. View feedback in your Melodi dashboard.
For optimal analytics, we recommend first creating threads using the SDKs, then referencing them in the feedback widget. This ensures all conversations are tracked, even those without feedback.
Installation Options
Basic Setup
-
Get a publishable API key from your Melodi settings (see API Access).
-
Add the MelodiAuthProvider with your API key:
Usage
Component Props
ID of an existing thread created via the SDK (recommended)
Alternative: Direct thread configuration object. See Thread format for details.
Information about the current user
Your company name to display in the feedback popover
Set the feedback widget variant
Options:
thumbs
(default): Thumbs up/down buttonsflag
: Flag button
Was this page helpful?