Basic Usage
Parameters
Unique identifier for the question.
The main question text or statement to be rated.
Additional text to provide context or instructions.
Whether the question is required.
The minimum value on the scale.
The maximum value on the scale.
Label for the minimum value on the scale.
Label for the maximum value on the scale.
A custom validation function that takes the response as input and returns true if valid, or an error message string if invalid.
Custom styles to apply to the question. Available keys are:
rootinnerContainertextContainertextsubTextscaleContainerscaleItemscaleInputscaleCirclescaleNumberscaleLabelserrorMessage
Data
Response Format The NumberScale question type returns a single number representing the selected rating:- A rating is selected when required is true.
- The selected rating is within the specified range (min to max).
- Any custom validation provided in the
customValidationfunction passes.
Methods
The NumberScale question type inherits methods from the base Element class and implements some specific methods:Set the response for the question.Parameters:
value(number): The selected rating
Validate the current response against the question’s rules.Returns:
- An object with
isValid(boolean) anderrorMessage(string) properties.
Update the styles of the selected rating option. This is called automatically when a response is set.

