React Feedback Form with Ratings
Collect user feedback with star ratings or NPS scores. Beautiful, accessible rating components with optional comment field.
Installation
npm install @formflow.sh/reactStar Rating Form
import { FeedbackForm } from '@formflow.sh/react';
function Feedback() {
return (
<FeedbackForm
apiKey="ff_live_xxx"
ratingType="stars"
maxRating={5}
onSuccess={(data) => {
console.log('Rating:', data.rating);
}}
/>
);
}NPS Score Form
<FeedbackForm
apiKey="ff_live_xxx"
ratingType="nps"
question="How likely are you to recommend us?"
/>Props
| Prop | Type | Default | Description |
|---|---|---|---|
apiKey | string | - | Your FormFlow API key |
ratingType | "stars" | "nps" | "stars" | Rating style |
maxRating | number | 5 | Max stars (for star rating) |
question | string | "How was your experience?" | Question text |
showComment | boolean | true | Show comment textarea |
commentRequired | boolean | false | Require comment |
theme | "minimal" | "modern" | "brutalist" | "glass" | "minimal" | Visual theme |
Rating Types
Star Rating (1-5)
Classic 5-star rating. Users click or tap to select their rating. Supports keyboard navigation.
NPS Score (0-10)
Net Promoter Score format. Displays 0-10 scale with Detractor (0-6), Passive (7-8), and Promoter (9-10) labels.
With Required Comment
<FeedbackForm
apiKey="ff_live_xxx"
ratingType="stars"
showComment={true}
commentRequired={true}
commentPlaceholder="Tell us more about your experience..."
/>Features
- Accessible - Full keyboard and screen reader support
- Animated - Smooth hover and selection animations
- Mobile-friendly - Touch-optimized tap targets
- Analytics - View average ratings in dashboard
Related
- ContactForm - Contact form
- SupportTicketForm - Support tickets