Streamlit: Multi Slider Widget

Created on 17 Dec 2019  路  3Comments  路  Source: streamlit/streamlit

Multi Slider Widget

I would be interested in seeing a multi-select slider tool.

image

the advantage of this tool would be receiving two values for the space of one slider. I would imagine the code looking like this.

import streamlit as st

a,b = st.multi_slider("Select Price Range:", 0,100, tick_1 = 13.00, tick_2 = 68.00, step = .25, f)

(wiser naming/syntax pending)

Reference:

interactive example of this widget:
https://codyhouse.co/ds/components/app/multi-value-slider

enhancement

Most helpful comment

Hi @isConic ,

This is currently possible with the existing slider widget by passing in a tuple/list of int/float for the value.

x = st.slider("Label", 0.0, 100.0, (25.0, 75.0), 0.5)

https://github.com/streamlit/streamlit/blob/develop/lib/streamlit/DeltaGenerator.py#L1770

All 3 comments

I've looked into baseweb and they do support this slider. https://baseweb.design/components/slider/#range

image

Hi @isConic ,

This is currently possible with the existing slider widget by passing in a tuple/list of int/float for the value.

x = st.slider("Label", 0.0, 100.0, (25.0, 75.0), 0.5)

https://github.com/streamlit/streamlit/blob/develop/lib/streamlit/DeltaGenerator.py#L1770

Thanks @jrhone !

Was this page helpful?
0 / 5 - 0 ratings