Patterns
FeedbackWidget
Floating feedback button that opens a popover with star rating and comment textarea.
Quick Preview
Installation
npm install lucide-react
// Copy component fromsrc/components/patterns/FeedbackWidget.tsx
Usage
import FeedbackWidget from '@/components/patterns/FeedbackWidget'// Floating feedback button โ self-contained<FeedbackWidgetonSubmit={(feedback) => saveFeedback(feedback)}/>
Prompt Preview
Copy a prompt that recreates this UI
Paste this into your AI coding assistant to generate code that closely matches the reference, including color, size, shape, typography, spacing, and polish.
Copy-ready AI prompt
Starts from the current visual reference and project constraints.
Tweak only product-specific copy or data after the first generation pass.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
question | string | - | Question to display in widget |
onSubmit | (rating: number, comment: string) => void | - | Submit callback |
className | string | - | Additional CSS classes |