15
from datetime import date
18
from streamlit import runtime
20
s1 = st.sidebar.slider("Label A", 0, 12345678, 12345678)
21
st.sidebar.write("Value A:", s1)
23
r1 = st.sidebar.slider("Range A", 10000, 25000, [10000, 25000])
24
st.sidebar.write("Range Value A:", r1)
26
with st.sidebar.expander("Expander", expanded=True):
27
s2 = st.slider("Label B", 10000, 25000, 10000)
28
st.write("Value B:", s2)
30
r2 = st.slider("Range B", 10000, 25000, [10000, 25000])
31
st.write("Range Value B:", r2)
33
w1 = st.slider("Label 1", 0, 100, 25, 1)
34
st.write("Value 1:", w1)
36
w2 = st.slider("Label 2", 0.0, 100.0, (25.0, 75.0), 0.5)
37
st.write("Value 2:", w2)
40
"Label 3 - This is a very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very long label",
46
st.write("Value 3:", w3)
48
w4 = st.slider("Label 4", 10000, 25000, 10000, disabled=True)
49
st.write("Value 4:", w4)
51
w5 = st.slider("Label 5", 0, 100, 25, 1, label_visibility="hidden")
52
st.write("Value 5:", w5)
54
w6 = st.slider("Label 6", 0, 100, 36, label_visibility="collapsed")
55
st.write("Value 6:", w6)
59
min_value=date(2019, 8, 1),
60
max_value=date(2021, 6, 4),
61
value=(date(2019, 8, 1), date(2019, 9, 1)),
63
st.write("Value 7:", dates[0], dates[1])
68
st.session_state.slider_changed = True
79
st.write("Value 8:", st.session_state.slider8)
80
st.write("Slider changed:", "slider_changed" in st.session_state)