.md →
CircularSlider API#
Bases: AnyWidget
Circular dial slider for selecting a single value.
Mirrors mo.ui.slider semantics (start/stop/step/value)
but lays the range out around a full circle. The start value sits at
12 o'clock and values increase clockwise.
Examples:
from wigglystuff import CircularSlider
dial = CircularSlider(start=0, stop=100, step=1, value=42)
dial
Create a CircularSlider.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
start
|
float
|
Lower bound of the mapped value range. |
0.0
|
stop
|
float
|
Upper bound of the mapped value range. |
100.0
|
step
|
float
|
Snap increment in value units (must be > 0). |
1.0
|
value
|
Optional[float]
|
Initial value; defaults to |
None
|
size
|
int
|
Diameter in pixels. |
220
|
thickness
|
int
|
Ring track thickness in pixels. |
18
|
show_value
|
bool
|
Render the current value as text below the dial. |
True
|
color
|
str
|
Optional CSS color (e.g. |
''
|
label
|
str
|
Optional text label shown above the dial. Empty string hides it. |
''
|
**kwargs
|
Any
|
Forwarded to |
{}
|
Source code in wigglystuff/circular_slider.py
Synced traitlets#
| Traitlet | Type | Notes |
|---|---|---|
value |
float |
Current value, mapped onto the circular track. |
start |
float |
Lower bound of the value range (sits at 12 o'clock). |
stop |
float |
Upper bound of the value range. |
step |
float |
Snap increment in value units. |
size |
int |
Diameter in pixels. |
thickness |
int |
Ring track thickness in pixels. |
show_value |
bool |
Render the current value as text below the dial. |
color |
str |
CSS color for the fill arc and handle border (e.g. "#ef4444"). Empty string follows the light/dark theme. |
label |
str |
Optional text label shown above the dial. Empty string hides it. |
Bases: AnyWidget
Circular dial slider for selecting a span of values.
Mirrors mo.ui.range_slider semantics but lays the range out around a
full circle. value is a (low, high) tuple; both ends are draggable.
Examples:
from wigglystuff import CircularRangeSlider
span = CircularRangeSlider(start=0, stop=100, step=1, value=(20, 80))
span
Create a CircularRangeSlider.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
start
|
float
|
Lower bound of the mapped value range. |
0.0
|
stop
|
float
|
Upper bound of the mapped value range. |
100.0
|
step
|
float
|
Snap increment in value units (must be > 0). |
1.0
|
value
|
Optional[Tuple[float, float]]
|
Initial |
None
|
size
|
int
|
Diameter in pixels. |
220
|
thickness
|
int
|
Ring track thickness in pixels. |
18
|
show_value
|
bool
|
Render the current |
True
|
color
|
str
|
Optional CSS color (e.g. |
''
|
label
|
str
|
Optional text label shown above the dial. Empty string hides it. |
''
|
**kwargs
|
Any
|
Forwarded to |
{}
|
Source code in wigglystuff/circular_slider.py
Synced traitlets#
| Traitlet | Type | Notes |
|---|---|---|
value |
tuple[float, float] |
Current (low, high) range. A drag that crosses the 12 o'clock seam produces a wrap-around tuple where low > high. |
start |
float |
Lower bound of the value range. |
stop |
float |
Upper bound of the value range. |
step |
float |
Snap increment in value units. |
size |
int |
Diameter in pixels. |
thickness |
int |
Ring track thickness in pixels. |
show_value |
bool |
Render the current low – high range as text below the dial. |