Toggle/Switch: Slider with two values

Using CSS and deleting/reordering some HTML in my browser’s developer tools, I hacked this from a select_slider:
image

st.select_slider("Displayed values:", ["Normalized", "Absolute"])

Would be cool to have something built-in that looks similar to this (regarding the display of labels, not the design):

image

What do you think?


Edit: I found this related topic, but it also does not have the labels to the left/right of the toggle:

1 Like

Hi @StefanBrand,

Thank you for sharing with the Streamlit community! We are always interested in learning more about desired features. Please feel free to submit a feature request here (click “New Issue” → Feature Request).

Best,

Caroline

Here you go:

1 Like