Streamlit-option-menu text removal

Hello, I really like this component, but I would like to remove the text that is displayed for the selected option. Does anyone know how to hack this?

Hey @ddealwis09,

Thanks for sharing this question! Can you share a code snippet as well?

Hi Caroline, below is the code for the component:

    # home page options
    home_options = option_menu(
    None,
    ["Welcome", "News", "KBPs", "Education", "Contact", "General"],
    icons=[
        "align-start",
        "file-earmark-text-fill",
        "people-fill",
        "book-half",
        "envelope",
        "info-square-fill",
    ],
    menu_icon="cast",
    default_index=0,
    orientation="horizontal",
    # styles={
    #     "container": {"padding": "0!important", "background-color": "#fafafa"},
    #     "icon": {"color": "orange", "font-size": "25px"}, 
    #     "nav-link": {"font-size": "12px", "text-align": "left", "margin":"0px", "--hover-color": "#eee"},
    #     "nav-link-selected": {"background-color": "green"},
    # }
    )
    home_options

    if home_options == "Welcome":
        add_bg_from_local('home_page_background.jpg') 

        # welcome message
        st.markdown("""
            <h2 style='text-align: center; color: white; font-size: 28px;'>Welcome to Open Si, your portal into the wealth of Strategic Insights' knowledge, research, data and tools</h2>
            """, unsafe_allow_html=True)

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