How can i hide the navigation bar that includes streamlit pages?


the goal is to hide the navigation bar on the side and not allow the user to switch between the pages, is that possible ?

Steps to reproduce

Code snippet:

add code here

If applicable, please provide the steps we should take to reproduce the error or specified behavior.

Expected behavior:

Explain what you expect to happen when you run the code above.

Actual behavior:

Explain the undesired behavior or error you see when you run the code above.
If youโ€™re seeing an error message, share the full contents of the error message here.

Debug info

  • Streamlit version: (get it with $ streamlit version)
  • Python version: (get it with $ python --version)
  • Using Conda? PipEnv? PyEnv? Pex?
  • OS version:
  • Browser version:

Requirements file

Using Conda? PipEnv? PyEnv? Pex? Share the contents of your requirements file here.
Not sure what a requirements file is? Check out this doc and add a requirements file to your app.


  • Link to your GitHub repo:
  • Link to your deployed app:

Additional information

If needed, add any other context about the problem here.

Hi @tarek-kerbedj

By default, the sidebar panel is not displayed unless it is explicitly defined via st.sidebar as a prefix to methods like write(), header(), etc.

Thus, to hide the sidebar, one can avoid that by not defining the st.sidebar as mentioned above.

Hope this helps!

hey @dataprofessor sorry for the confusion , i meant how can i hide the pages sidebar that shows the files located in the pages directory

Hi @tarek-kerbedj

I see, itโ€™s a multi-page app which is inferred by the presence of app pages in the pages sub-folder. Can you try renaming the pages sub-folder to something else.

in that case, would that allow me to navigate between the pages? say by clicking a button or something else
my goal is to hide the pages AND navigate between pages using a button

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.