Simple thumbs up/down rating controls for collecting binary feedback. Perfect for "Was this helpful?" scenarios in knowledge bases, support chats, and feature feedback.
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.
Start with the simplest use case - a basic thumbs up/down question. The value will be 'up', 'down', or null.
addThumbRating() for quick binary feedback. Click a thumb to select, click again to deselect (by default). Add text labels under the thumbs to make the options clearer for users.
showLabels: true with upLabel and downLabel to customize the text. Default labels are "Yes" and "No". Control the size of thumb buttons with the size property.
'sm' (compact), 'md' (default), 'lg' (prominent). Use larger sizes for primary questions. Make the rating mandatory before form submission.
isRequired: true to require users to select a rating. The form will show a validation error if not selected. Control whether users can change their mind by clicking the same thumb again.
allowDeselect: true lets users clear their selection. Set to false to make the choice permanent. Control the horizontal alignment of the thumb buttons within the container.
alignment to position the buttons: 'left' (default), 'center', or 'right'. This is useful for matching your form's design style. Show different follow-up questions based on whether the user gave positive or negative feedback.
form.thumbRating('id')?.value() to get 'up' or 'down'. React differently to positive vs negative feedback! A complete support chat feedback form with branching paths for positive and negative feedback.
A knowledge base article feedback form that thanks users for positive feedback and collects improvement suggestions for negative feedback.
Great! You've learned how to collect quick binary feedback with thumb ratings. Ready to explore more?
Continue to Emoji Rating TutorialOther learning paths: