How do I hide the hamburger menu from my app?
Overview
Streamlit allows developers to configure their hamburger menu to be more user-centric via st.set_page_config()
. While you can configure menu items with st.set_page_config()
, there is no native support to hide/remove the menu from your app.

1: A hamburger menu appears on the top-right side of your app.
Solution
You can, however, use an unofficial CSS hack with st.markdown()
to hide the menu from your app. To do so, include the following code snippet in your app:
import streamlit as st
hide_menu_style = """
<style>
#MainMenu {visibility: hidden;}
</style>
"""
st.markdown(hide_menu_style, unsafe_allow_html=True)
The hamburger menu will no longer appear on the top-right side of your app, as shown in the image below! 🎈

2: Hamburger menu hidden with an unofficial CSS hack.
Relevant resources:
- Ability to hide the hamburger menu #395
- How do I hide/ remove the menu in production?
- Unofficial CSS hack to remove the hamburger menu
- Officially supported method to configure the hamburger menu
- Streamlit’s current roadmap