Professional rating scales for customer feedback surveys, including NPS (Net Promoter Score), CES (Customer Effort Score), Likert scales, and custom scales. These are essential components for measuring customer satisfaction, loyalty, and experience.
Every code snippet below is fully editable! Feel free to modify the code, experiment with different values, and see your changes reflected instantly in the live preview on the right.
Use the play button to run different snippet, or the refresh button to restore the original example.
Let's start with the most popular feedback metric: Net Promoter Score (NPS). The preset: 'nps' automatically configures a 0-10 scale with standard labels.
Enhance your NPS with visual feedback! Enable showSegmentColors to color-code each value (red for detractors, yellow for passives, green for promoters), and showCategoryLabel to display the category name after selection. You can also customize the category labels using categoryLabels.
categoryLabels to replace default labels ("Detractor", "Passive", "Promoter") with custom ones like "Critic", "Neutral", "Fan". Likert scales are perfect for measuring agreement with statements. Use preset: 'likert-5' for a 1-5 scale or 'likert-7' for more granularity. Both come with "Strongly disagree" to "Strongly agree" labels.
CES measures how easy it was for customers to accomplish a task. The preset: 'ces' creates a 1-7 scale with "Very difficult" to "Very easy" labels.
The satisfaction preset is ideal for simple satisfaction surveys. It's a 1-5 scale with "Very dissatisfied" to "Very satisfied" labels.
Need a different range? Use preset: 'custom' and define your own min, max, lowLabel, and highLabel.
Choose between two visual styles: variant: 'buttons' (default) shows individual clickable buttons, while 'segmented' displays a connected segmented control.
Control the appearance with size: 'sm' | 'md' | 'lg' and alignment: 'left' | 'center' | 'right'.
Make the rating scale mandatory before form submission with isRequired: true.
isRequired is set, the form will show a validation error if the user tries to submit without selecting a rating. Try clicking Submit without selecting anything! Add a celebratory touch! Enable showConfettiOnPromoter: true to trigger a confetti animation when users select a promoter score (9 or 10).
Control whether users can change their mind by clicking the same value again to clear their selection.
allowDeselect: true lets users clear their selection by clicking the same value twice. Set to false to make the choice permanent - once a value is selected, it cannot be removed. Use onCategoryChange to track the user's decision journey - count how many times they changed their mind, remember their first impression, and show special follow-up questions for hesitant users. Combine with npsCategory() for reactive UI updates.
Let's put it all together! This complete example combines NPS, CES, Likert scales, and satisfaction ratings in organized subforms, with conditional follow-up questions.
npsCategory() to personalize the experience based on initial responses. | Preset | Range | Low Label | High Label | Use Case |
|---|---|---|---|---|
nps | 0-10 | Not at all likely | Extremely likely | Customer loyalty |
likert-5 | 1-5 | Strongly disagree | Strongly agree | Agreement surveys |
likert-7 | 1-7 | Strongly disagree | Strongly agree | Detailed agreement |
ces | 1-7 | Very difficult | Very easy | Effort measurement |
satisfaction | 1-5 | Very dissatisfied | Very satisfied | Satisfaction surveys |
custom | Your choice | Your choice | Your choice | Any custom scale |
Excellent! You've mastered rating scales for professional feedback surveys. Ready to explore more form components?
Continue to Price Display TutorialOther learning paths: