Closed SivamPillai closed 2 years ago
Thanks for the kind words. Absolutely you can do what you are thinking, there is one big issue though, due to the way Streamlit does same origin security, if you use an iFrame it will not load properly usually if the site has HTTPS enabled, as the security policy prevents the page from loading, hence the Streamlit approach is to open the page into a new tab.
You can create an entry on the navbar as usual and add code like this to load the page into an iFrame.
import streamlit.components.v1 as components
if navbar_output == 'Google':
components.iframe("https://www.google.com")
Hope that helps.
First of all, thank you for this easy-yet-powerful component! It makes my streamlit app a lot more capable!
Is there a way for the navbar links to point to an external webpage (or is there a hack to achieve this)?
I would like one of my menus say Google, to navigate to https://google.com in the same tab.
I am thinking of using st.markdown to achieve this but not quite sure how.
Thanks for your help!