Sometimes it's useful for sliders to display label their range. This could be the minimum/maximum, the zero point, or (if a step size is specified) the steps. Related, but separate: It would be nice to have small tick marks below the slider and above the values.
Suggested Solution
Add two parameters:
show_ticks: bool | list[float] = False
show_labels: bool | list[str] = False
If show_ticks is False, no ticks are displayed. If True, come up with ticks automatically and add them. If a list, add ticks exactly at the specified locations.
If show_labels is False, no labels are displayed. If True the values at the given tick locations are displayed. If a list of strings, it must match the number of ticks and those exact strings are displayed.
Description
Sometimes it's useful for sliders to display label their range. This could be the minimum/maximum, the zero point, or (if a step size is specified) the steps. Related, but separate: It would be nice to have small tick marks below the slider and above the values.
Suggested Solution
Add two parameters:
show_ticks: bool | list[float] = False
show_labels: bool | list[str] = False
If
show_ticks
isFalse
, no ticks are displayed. IfTrue
, come up with ticks automatically and add them. If a list, add ticks exactly at the specified locations.If
show_labels
isFalse
, no labels are displayed. IfTrue
the values at the given tick locations are displayed. If a list of strings, it must match the number of ticks and those exact strings are displayed.Alternatives
No response
Additional Context
No response
Related Issues/Pull Requests
47