question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Ability to hide the hamburger menu

See original GitHub issue

See: https://discuss.streamlit.io/t/how-do-i-hide-remove-the-menu-in-production/362

When developing a Streamlit app, the hamburger menu is quite useful. But afterwards, it has almost no use. Should we just remove it when in “serving to end-users” mode?

This could be part of a larger “serving mode” idea: 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 proposed in this bug)
  2. Streamlit would not watch your filesystem for changes
  3. Probably some other stuff 😄

Community voting on feature requests enables the Streamlit team to understand which features are most important to our users.

If you’d like the Streamlit team to prioritize this feature request, please use the 👍 (thumbs up emoji) reaction in response to the initial post.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:68
  • Comments:14 (2 by maintainers)

github_iconTop GitHub Comments

82reactions
dansbeckercommented, Jan 28, 2020

It’s not a built-in solution for the product itself, but for any user who stumbles on this, we hide the hamburger menu with the following hack:

hide_menu_style = """
        <style>
        #MainMenu {visibility: hidden;}
        </style>
        """
st.markdown(hide_menu_style, unsafe_allow_html=True)

11reactions
MarcSkovMadsencommented, Oct 14, 2019

Hi @tvst .

Could it be an idea to make it an option in the config.toml file? As far as I can see you would have to configure the config.toml file for production anyways. And then enable setting command line flags instead

streamlit run app.py --menu-for-production

or something 😃

I believe users would wish a lot of different configurations in production anyways.

So a serve command would not make it. Just my 2 cents.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I hide the hamburger menu from my app?
, there is no native support to hide/remove the menu from your app. 1: A hamburger menu appears on the top-right side of...
Read more >
Data and Analytics Consulting – Collapsible “Hamburger” Menu
Collapsible “hamburger” menus are used in web design to hide navigation buttons or filters except when expanded so these elements don't take up...
Read more >
Hamburger Menus and Hidden Navigation Hurt UX Metrics
Discoverability is cut almost in half by hiding a website's main navigation. Task time is longer and perceived task difficulty increases.
Read more >
Lesson146 - Flyout Menu , Hamburger Menu with Show/Hide
Description - This Video Covers Flyout Menu , Hamburger Menu with Show/HideNumbering - 146/1000 Power Apps Videos.
Read more >
How can I remove/hide the hamburger menu from a project
Hi. Is anyone able to tell me how I can remove the hamburger menu icon from a course? I have a really simple...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found