Feedback Widget Overview
Embeddable feedback widget for collecting user feedback on AI responses
The Cobbl Feedback Widget is a lightweight, embeddable widget for collecting user feedback on AI prompt responses. It seamlessly integrates with your application and sends feedback directly to the Cobbl platform.
The widget requires no API key and is safe for client-side use. Feedback submission is public and anonymous.
Try It Out
Trigger Variant
A subtle text link that opens a feedback flyout when clicked.
Thumbs Variant
Thumbs up/down buttons that immediately register feedback and open a flyout for additional comments.
Inline Variant
Full feedback form rendered directly without any flyout.
Features
Three Ways to Use
Script Tag
Drop into any HTML page. Perfect for static sites, WordPress, Webflow, etc.
JavaScript
Stripe Elements-style API for full programmatic control.
React
First-class React support with proper hooks and lifecycle management.
Display Variants
The widget supports three display variants to match your UI needs:
| Variant | Description | Best For |
|---|---|---|
trigger | Text button that opens a feedback flyout | Minimal footprint, unobtrusive feedback |
thumbs | Thumbs up/down buttons that open a flyout | Quick rating with optional details |
inline | Full feedback form rendered directly | Dedicated feedback sections |
Quick Example
<div id="cobbl-feedback-widget" data-run-id="your-run-id"></div>
<script src="https://cdn.jsdelivr.net/npm/@cobbl-ai/feedback-widget"></script>How It Works
- Get a Run ID: When you run a prompt with CobblAdminClient, you receive a
runIdin the response. - Display the Widget: Mount the widget with the
runIdto collect user feedback. - Users Submit Feedback: Users can rate the response and provide optional comments.
- Feedback is Stored: All feedback is sent to Cobbl and associated with the prompt run.
// 1. Run a prompt (server-side)
const result = await adminClient.runPrompt('customer_email', { name: 'John' })
// 2. Pass runId to your frontend
const runId = result.runId
// 3. Display the widget (client-side)
<FeedbackWidget runId={runId} />Browser Support
| Browser | Minimum Version |
|---|---|
| Chrome | 73+ (March 2019) |
| Firefox | 101+ (May 2022) |
| Safari | 16.4+ (March 2023) |
| Edge | 79+ (January 2020) |
The widget uses modern browser features including Shadow DOM, Constructable Stylesheets, and MutationObserver.