When creating a slider (with a selected value, not a range), the left side of the slider (between the min value and the selected value) is colored.
Can we get a st. slider parameter to swap this to the right side (between the selected value and the max value) instead? Or is it possible to solve this another way?
There is a two-sided slider, but that would make both the left and right sides movable.
If you’d like to request a feature or enhancement, I encourage you to file an issue on GitHub. Our engineers track requested work there.
@mathcatsand’s two-sided slider idea + hacky css to hide the second slider knob thing.
st.slider("Number", 0, 100, value=(0, 100))
css = """
<style>
div[data-testid="stSlider"] div[data-baseweb="slider"] div[role="slider"]:nth-child(2){
display: none;
}
</style>
"""
st.html(css)
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.