When and Why to Use
Use this to capture how strongly a respondent feels about a given item or concept on a numeric scale. Ideal for:
Measuring attitudes or satisfaction
Capturing degrees of liking, agreement, or importance
Top-box / bottom-box analysis with recodes
Portrait Experience
Slider, button, or card-style input depending on
style
Labels shown inline or at ends of the scale
Optional "Don't know" button at the bottom if configured
Landscape Experience
Input rendered more horizontally with larger interactive area
Works well with remote or keyboard input
Card layout shown as tiles with label-only options
Configuration Options
Option | Type | Required | Default | Description |
|
| yes | - | Text prompt shown to respondent |
|
| no | 5 or label count | Number of points on the scale |
|
| no | 1 or first label | Starting value on the scale |
|
| no |
| "slider", "button", "card", or "star" |
|
| no | - | Labels for specific points on the scale |
|
| no | - | Optional image shown above the question |
|
| no | random | Default value used in test mode |
|
| no | - | Adds a "Don't know" option with this label |
|
| no | - | Map numeric responses into grouped outputs |
| `Callable[[int], str | None]` | no | - |
|
| no | - | For token substitution in text and grouped reporting |
Example Code
Basic 5-point slider:
s.rating_question( "How much do you like this product?", number_of_points=5, style="slider", labels={ 1: "Dislike", 3: "Neutral", 5: "Like" } )
With recodes:
s.rating_question( "How much do you like this product?", number_of_points=5, recodes={ "1": "dislike", "2": "dislike", "3": "neutral", "4": "like", "5": "like" } )
With "Don't know" and topic token:
s.rating_question( "How do you rate {brand} cars?", number_of_points=5, labels={ 1: "Dislike", 3: "Neutral", 5: "Like" }, dont_know_option="Don't know", topic="Ford" )
Notes
slider
andbutton
styles include numeric values with labelscard
style shows label-only tiles for opinion-based text ratingsdont_know_option
responses are recorded as -999Use
recodes
to collapse scale points for reportingcustom_validator
is helpful for attention checks or edge case handling