Prerequisites
Before using the AppSloth Feedback component, make sure you’ve:- Set up AppSloth in your project
- Installed the required shadcn/ui components:
Adding the Feedback Component
The AppSloth Feedback component provides a customizable dialog for collecting user feedback and ratings. It integrates seamlessly with your application and includes emoji-based ratings, text feedback, and customizable styling. Adding the Feedback component to your application is straightforward:Position your FeedbackButton component where it’s easily accessible to users.
Common placements include the navigation bar, footer, or floating in the
bottom-right corner of the page.
How It Works
The Feedback component provides a comprehensive way to collect user feedback:- Easy Integration: Drop-in component that handles all feedback collection logic
- Emoji Ratings: Built-in emoji-based rating system (customizable)
- Text Feedback: Optional text input for detailed feedback
- Automatic Submission: Handles submission to AppSloth’s servers
- Customizable UI: Extensive styling and configuration options
- Path Tracking: Automatically tracks which page the feedback was submitted from
Customization Options
The FeedbackButton component is highly customizable through props:Button Customization
You can customize the appearance and behavior of all buttons:Dialog Customization
Customize the feedback dialog’s appearance and content:Rating System Customization
You can customize the rating system or disable it entirely:Submission Behavior
Control how feedback is submitted and validated:Component Props
| Prop | Type | Default | Description |
|---|---|---|---|
triggerButton | ButtonConfig | { text: "Give Feedback", variant: "default" } | Configuration for the trigger button |
submitButton | ButtonConfig | { text: "Submit", variant: "default" } | Configuration for the submit button |
cancelButton | ButtonConfig | { text: "Cancel", variant: "outline" } | Configuration for the cancel button |
dialogTitle | string | ”Submit Feedback” | Title of the feedback dialog |
dialogDescription | string | ”Share your thoughts and help us improve.” | Description text in the dialog |
ratingItems | RatingItem[] | Default emoji ratings | Custom rating items configuration |
requireFeedbackOrRating | boolean | true | Whether to require either feedback text or rating |
showRatings | boolean | true | Whether to show the rating system |
textareaPlaceholder | string | ”Share your feedback… (optional)“ | Placeholder text for the feedback textarea |
textareaClassName | string | "" | Additional class names for the textarea |
textareaMinHeight | number | 100 | Minimum height of the textarea in pixels |
successMessage | string | ”Feedback submitted successfully” | Success message shown after submission |
onFeedbackSubmit | (feedback: string, score?: number) => void | undefined | Optional callback when feedback is submitted |
disableDefaultSubmit | boolean | false | If true, disables the default fetch behavior |
dialogClassName | string | "" | Additional class names for the dialog content |
ratingsClassName | string | "" | Additional class names for the ratings container |
Viewing Feedback in the Dashboard
All submitted feedback is automatically collected and can be viewed in your AppSloth Dashboard:- Log into your AppSloth Dashboard
- Navigate to the “Feedback” section
- View and analyze feedback data:
- Filter by date range
- Sort by rating score
- Export feedback data
- View feedback trends and patterns
