Toggle, hide sidebar


After select some options on the sidebar of my app, I have a button to make the prediction.

I would like to know if is there a way to toggle/hide the sidebar?

On mobile, that gets in the way of usability.


Hey @Racchel!

Assuming I understood your question the solution is very easy. When you have the sidebar open there is a little “X” in the top right hand corner, this will collapse the sidebar so you can use the rest of your app! I attached a picture of what this looks like on a phone.

If you need to (or want to) open the sidebar again, there is an arrow in the top left corner after you have collapsed it that allows you to re-open the side bar.

Hopefully I have not misunderstood and this helps!
Happy Streamlit-ing!

1 Like

3 posts were split to a new topic: Refresh clearing predictions on mobile when scrolling to the top