Are there any ways to close the streamlit sidebar programmatically?
The goal is to have the sidebar opened at the beginning as it is where the user can select some of the modules.
But then I would like to automatically “fold/close” the sidebar so that the user can have a “full screen” experience on.
Above is my demo app sidebar divided into different “pages” and including a SessionState module so when the user connects to the application, they first access a streamlit form to authenticate to the App on my backend database:
Once they are logged in properly they will automatically land on the Welcome page and the sidebar will be expanded by default.
Next, if the user selects for example “Market Overview” module, I would like to automatically hide/close the sidebar at this stage. So the user doesn’t have to manually close it and can have a full-screen experience on the module.
Hope it is clear let me know what you think!