PlaySlider API#
Bases: AnyWidget
Slider with a play/pause button that auto-advances at a configurable pace.
Examples:
from wigglystuff import PlaySlider
slider = PlaySlider(min_value=0, max_value=50, step=1, interval_ms=300)
slider
Create a PlaySlider.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
Optional[float]
|
Starting position; defaults to min_value. |
None
|
min_value
|
float
|
Lower bound. |
0.0
|
max_value
|
float
|
Upper bound. |
100.0
|
step
|
float
|
Increment per tick. |
1.0
|
interval_ms
|
int
|
Milliseconds between auto-advance ticks. |
200
|
loop
|
bool
|
Wrap to min_value when reaching the end instead of stopping. |
False
|
width
|
int
|
Widget width in pixels. |
400
|
**kwargs
|
Any
|
Forwarded to |
{}
|
Source code in wigglystuff/play_slider.py
values
property
#
All discrete values from min_value to max_value (inclusive) at the current step.
Synced traitlets#
| Traitlet | Type | Notes |
|---|---|---|
value |
int |
Current slider value. |
min_value |
int |
Minimum value. |
max_value |
int |
Maximum value. |
step |
int |
Step size per tick. |
interval_ms |
int |
Milliseconds between auto-advance ticks. |
playing |
bool |
Whether the slider is currently auto-advancing. |
loop |
bool |
Whether to loop back to min_value after reaching max_value. |
width |
int |
Widget width in pixels. |