NpsInput
Net Promoter Score input widget for collecting customer feedback scores.
Signature
def NpsInput(
label: str,
key: str = None,
required: bool = True,
min: int = 0,
max: int = 10,
min_hint: str = 'Not at all likely',
max_hint: str = 'Extremely likely',
hint: str = None,
full_width: bool = False,
disabled: bool = False,
errors: Union[List[str], str] = None,
value: int = 0
)
Parameters
Name | Description | Type | Default |
---|---|---|---|
label (required) | Text label displayed above the input. | str | None |
key | Identifier for the widget, defaults to label if not provided. | str | None |
required | Whether a score must be selected before proceeding. | bool | True |
min | Minimum score value. | int | 0 |
max | Maximum score value. | int | 10 |
min_hint | Text displayed beneath the minimum score value. | str | 'Not at all likely' |
max_hint | Text displayed beneath the maximum score value. | str | 'Extremely likely' |
hint | Help text displayed below the input. | str | None |
full_width | Whether the input should take up the full width of its container. | bool | False |
disabled | Whether the input is non-interactive. | bool | False |
errors | Pre-defined validation error messages to display. | Union[List[str], str] | None |
value | Initial value of the score. | int | 0 |