Slider Cards
Card types:
intSlider
,floatSlider
Data type of variable:
int
orfloat

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:
Name | Type | Required | Description |
---|---|---|---|
unit | str | No | The unit of the value. |
min | int or float | Yes | The minimum value of the slider. |
max | int or float | Yes | The maximum value of the slider. |
step | int or float | Yes | The 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),
)

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),
)

Last updated on