How do i hide/ remove the menu in production?

Hi

I would like to be able to remove the menu bar when shipping to production. Is that possible?

image

I would think it natural to remove. The user does not need to understand that this is a Streamlit app as far as I can see. Maybe they would still need to be able to recalculate? Or clear the cache? But so far I only see the use case for that in development.

Thanks

1 Like

Or even better. At some stage someone would ask for a menu for navigation. Could the existing menu be extended to that so that

  1. I as a developer i could configure which of the existing items to enable and disable.
  2. Add my own items that if clicked would trigger an update
  3. enable a tree structure of subitems of items.
  4. choose between the existing minimized layout or a maximized, expanded top menubar layout

?

so far I only see the use case for that in development.

I agree. We’ve been thinking about how to solve that one lately. One idea is: when developing a Streamlit app you’d use streamlit run myname.py as usual, but when serving it to users you’d use streamlit serve myname.py.

The latter would start the app normally except:

  1. The hamburger menu have fewer items (or maybe it wouldn’t be there at all, as you propose)
  2. Streamlit would not watch your filesystem for changes
  3. Probably some other stuff :smiley:

I started a feature request to track this here: https://github.com/streamlit/streamlit/issues/395

1 Like

And also this one: https://github.com/streamlit/streamlit/issues/396

1 Like

Has there been a solution for removing this yet?

1 Like

Hey @zacheism :wave:, this is a functionality that we’re still building out and we don’t yet have a set timeline for when it will be available. I’d definitely recommend following, upvoting, and/or commenting on the enhancement though! We’d :heart: to get your input on it, especially while it’s still in the development phase. We’re always looking for feedback from the community about workflows and how Streamlit is being used in those workflows.

3 Likes

Sounds good! I don’t really have much to add to the issue, just that this menu doesn’t really serve any purpose to the user, so there’s no reason the user should see it. I like the production / development mode idea though as it is helpful for clearing the cache / rerunning. But having two menus (the side bar and the hamburger), in my opinion, is just confusing and somewhat odd from a UI/UX perspective. But then again, I much prefer minimalistic design (which you guys otherwise nail) so this could just be my opinion.

2 Likes