Make it more explicit for end users what steps are available in a slider

Is it possible to make more explicit for users what steps are available in a slider? Maybe with tiny ticks?

Consider for example:

c = st.sidebar.slider(
    "Damping coefficient · c",
    min_value=0.0,
    max_value=0.0001,
    value=c,
    step=0.00001,
    format="%g",
)

Which is rendered as:

Screen Shot 2020-09-26 at 14.12.29

Because the values in this slider are not integers and the step is not shown anywhere, it can be confusing for end users to know how much they should drag a slider.

I could use st.number_input instead of st.slider, but with number_input end users lose the ability to easily (visually) glance at the min and max values that are allowed.

It seems to me that tiny tick marks at the bottom of the slider could be very useful in such scenarios.

Thanks!

4 Likes