AI Feedback Collector
A component for collecting user feedback on AI-generated content.
Installation
Basic Usage
Basic Usage
Was this response helpful?
Comments Support
Enable users to provide text feedback for more detailed responses.
With Comments
Did this answer help you?
Customization
Style Variants
Style Variants
Default
Was this response helpful?
Minimal
Was this response helpful?
Card
Was this response helpful?
Color Schemes
Color Schemes
Default
Was this response helpful?
Blue
Was this response helpful?
Green
Was this response helpful?
Purple
Was this response helpful?
Amber
Was this response helpful?
Size Variants
Size Variants
Small
Was this response helpful?
Medium (Default)
Was this response helpful?
Large
Was this response helpful?
Custom Icons
Custom Icons
Rate this response
How was this answer?
Integration Examples
Chat UI Integration
Chat Integration
The GDP of France was approximately €2.5 trillion in 2022, making it the 7th largest economy in the world.
Was this helpful?
Props
Prop | Type | Default |
---|---|---|
variant? | "default" | "minimal" | "card" | "default" |
size? | "sm" | "md" | "lg" | "md" |
colorScheme? | "default" | "blue" | "green" | "amber" | "purple" | "default" |
onFeedback? | (feedback: { type: "positive" | "negative" | null; comment?: string }) => void | Promise<void> | - |
allowComments? | boolean | false |
commentsOnNegativeOnly? | boolean | true |
promptText? | string | "Was this response helpful?" |
thanksText? | string | "Thanks for your feedback!" |
commentPromptText? | string | "Would you like to add a comment?" |
commentPlaceholder? | string | "What could be improved?" |
commentSubmitText? | string | "Send" |
submittingText? | string | "Sending..." |
positiveIcon? | React.ReactNode | <ThumbsUp /> |
negativeIcon? | React.ReactNode | <ThumbsDown /> |
buttonClassName? | string | - |
activeButtonClassName? | string | - |
commentFieldClassName? | string | - |