It’s a real shame there is no support for removing the hamburger icon completely in production. I’ve got a navbar working, but when moving between pages or loading/reloading the hamburger menu can be seen beneath.
I would love to see support for fully removing this in production! it would make the apps much more professional looking.
Woah finally! Thanks a lot @snehankekre
After almost 3 years of Streamlitting, this is the closest I’ve come to a streamlit --serve kind of solution. Have never deployed a Streamlit app because of the hamburger menu giving quite some options to any visitor of the app.
It’s a bit weird that it has to be added to the query params but it’s leagues better than the not really secure suggestion we have in the knowledge base: How do I hide the hamburger menu from my app? - Streamlit Docs
Since people can still use the browser’s dev tools to remove the visibility hidden CSS and get access to the hamburger menu anyway.
Is the team considering adding embed=true as a possible configuration option in either the .toml or as an argument to the set_page_config() function?
I believe the hamburger menu discussion has been open since early 2019 so I’m really hoping for a configurable solution soon
Ah I’ve noticed a big drawback when using /?embed=true: a scrollbar is never added to the page.
So when one has a few items on the page, some of it is off-screen and unreachable.
So for small apps with 3 widgets this might work fine but a big form with lots of inputs still needs a different solution.
I really hope the team can come up with a solution soon
So using this along with ?embed=true seemed to be the solution , but another drawback of this is that the part which shows ‘Connecting’ or ‘Running’ is also hidden.
The code above minimizes the height, changes the background color to white (if that’s the background color) and executes the show_menu option as documented below.
Thanks for stopping by! We use cookies to help us understand how you interact with our website.
By clicking “Accept all”, you consent to our use of cookies. For more information, please see our privacy policy.
Cookie settings
Strictly necessary cookies
These cookies are necessary for the website to function and cannot be switched off. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms.
Performance cookies
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us understand how visitors move around the site and which pages are most frequently visited.
Functional cookies
These cookies are used to record your choices and settings, maintain your preferences over time and recognize you when you return to our website. These cookies help us to personalize our content for you and remember your preferences.
Targeting cookies
These cookies may be deployed to our site by our advertising partners to build a profile of your interest and provide you with content that is relevant to you, including showing you relevant ads on other websites.