Favicon for a mutlipage st.navigation

Good day,

I am coding a multipage app with st.navigation.
I know how to set the favicon for a single page but the favicon of the page for a st.navigation app is always the default streamlit favicon.
Any idea how I can change it?

Thank you

Hey @S_bastien, you can pass the icon argument to st.Page (see docs), e.g. st.Page("home.py", title="Home", icon=":material/home:", default=True) or st.Page("log.py", title="Log", icon="🔥", url_path="log").
The only limitation is that this will make the icon also show up in the sidebar navigation in addition to be used as the favicon.

Hello, That is what i did in my code. I used material ui icon but it doesn’t show up on the favicon only in the sidebar.
Any idea?

Page1 = st.Page(“strategy/Page1.py”, title=“Page1”, icon=“:material/rewarded_ads:”)

Page2 = st.Page(“strategy/Page2.py”, title=“Page2”, icon=“:material/school:”, default=True)

Page3 = st.Page(“strategy/Page3.py”, title=“Page3”, icon=“:material/fast_rewind:”)

pg = st.navigation({“Strategy”: [Page1, Page2, Page3]})

@S_bastien What version of the library are you using? Here is also a thread from Joshua explaining the priority order of favicons: [Launched!] Multi-page apps: Improved API and new navigation UI features · Issue #8388 · streamlit/streamlit · GitHub
Another issue might be some weird browser caching? In this case you could try opening the app in incognito mode and see whether that helps.

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