Skip to Content
DataCards 2.2.4 is released 🎉

Slider Cards

Card types: intSlider, floatSlider

Data type of variable: int or float

Integer slider card

The slider cards allow users to select a value from a range of values. Dragging the slider will update the value of the connected DataCards variable. The Integer Slider deals with integer values, while the Float Slider deals with floating point values.

In addition to the common parameters and the input card parameters, the slider cards have the following configuration options:

NameTypeRequiredDescription
unitstrNoThe unit of the value.
minint or floatYesThe minimum value of the slider.
maxint or floatYesThe maximum value of the slider.
stepint or floatYesThe step size of the slider.

Examples

Integer Slider card

datacards.publish.card( type='intSlider', label='Tweak', unit='Unit', min=0, max=100, step=1, variable_key='my_integer_slider' logic_view_size=(2,1), )
Integer slider card

Float Slider card

datacards.publish.card( type='floatSlider', label='Tweak', unit='Unit', min=0, max=1, step=0.05, variable_key='my_float_slider' logic_view_size=(2,1), )
Float slider card
Last updated on