How I can hide all elements of hamburger menu except screencast?
- Local app
- Streamlit 1.31 and Python 3.11
How I can hide all elements of hamburger menu except screencast?
Hi @alma,
Thanks for sharing this question!
You can configure what options are displayed in the hamburger menu by changing the toolbarMode
setting in your config.toml
file (check out our doc here). It sounds like the minimal
might be closest to what you’re looking for.
I saw this article.
but what should be written?
with:
st.set_page_config(
menu_items={
'Record a screencast': 'Record a screencast'
} )
get:
StreamlitAPIException : We only accept the keys: “Get help”, “Report a bug”, and “About” (“record a screencast” is not a valid key.)
You can add a config.toml
file to your Streamlit app (it should be stored in a folder called .streamlit
) and then you can add the following to your config.toml
file:
[client]
# Change the visibility of items in the toolbar, options menu,
# and settings dialog (top right of the app).
# Allowed values:
# * "auto" : Show the developer options if the app is accessed through
# localhost or through Streamlit Community Cloud as a developer.
# Hide them otherwise.
# * "developer" : Show the developer options.
# * "viewer" : Hide the developer options.
# * "minimal" : Show only options set externally (e.g. through
# Streamlit Community Cloud) or through st.set_page_config.
# If there are no options left, hide the menu.
# Default: "auto"
toolbarMode = "minimal"
but I need also screencast
result:
Unfortunately, I don’t think there’s an option to only display the screencast option, but the “viewer” option should hide all the developer options (and screencast isn’t a developer option).
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.
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.
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.
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.