shapelets.apps.DataApp.number_input#

DataApp.number_input(title: Optional[str] = None, value: Optional[Union[int, float]] = None, default_value: Optional[Union[int, float]] = None, placeholder: Optional[str] = None, min: Optional[Union[int, float]] = None, max: Optional[Union[int, float]] = None, step: Optional[Union[int, float]] = None, text_style: Optional[dict] = None, units: Optional[str] = None, **additional) NumberInputWidget#

A basic widget for getting the user input as a number field.

Parameters:
titlestr, optional

String with the widget title. It will be placed on top of the widget box.

valueint or float, optional

Define number value.

default_valueint or float, optional

Default value for the widget.

placeholderstr, optional

Text showed inside the widget by default.

minint or float, optional

Minimum value of the widget.

maxint or float, optional

Maximum value of the widget.

stepint or float, optional

The granularity the widget can step through values. Must greater than 0, and be divided by (max - min).

text_styledict, optional

Dict to customize text: font size, font type y font style.

unitsstr, optional

Specifies the format of the value presented, for example %, KWh, Kmh, etc.

Returns:
Number Input.

Examples

>>> number_input = app.number_input()
>>> number_input = app.number_input(min=1,max=100,step=5,units='%')

Bind compatibility

You can bind this widget with this:

Bindable as

You can bind this widget as:

  • int

  • float