How to hide or remove the "Deploy" button that appears at the top-right corner of the Streamlit app

  1. Are you running your app locally or is it deployed? Locally
  2. If your app is deployed:
    a. Is it deployed on Community Cloud or another hosting platform? NA
    b. Share the link to the public deployed app. NA
  3. Share the link to your app’s public GitHub repository (including a [requirements file] (App dependencies - Streamlit Docs)). NA
  4. Share the full text of the error message (not a screenshot).
  5. Share the Streamlit and Python versions.Streamlit Version: 1.23.1
    Python 3.7.16

How to hide or remove the “Deploy” button that appears at the top-right corner of the Streamlit app ?

image

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

You can target the stDeployButton css class

st.markdown(
    r"""
    <style>
    .stDeployButton {
            visibility: hidden;
        }
    </style>
    """, unsafe_allow_html=True
)
2 Likes

Thank You @edsaac it’s working !!!

image

Can you also tell me how to hide this buttons also : “Running” and “Stop” ?
Thanks !!

This should do the trick, but I would not recommend hiding those controls tbh.

[data-testid="stStatusWidget"] {
    visibility: hidden;
}
1 Like

Just to add about the “Deploy” button: this is part of the developer options that show in the toolbar. There is a configuration option to control the display of developer options. By default, developer options will show when running the app locally.

Check out the toolbarMode config option under Client:

(CSS is still needed to hide the running man, though.)

2 Likes

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.