How we can add a tab using streamlit.
As per this thread, the way to open a new tab would be via the following piece of code:
st.markdown('<a target="_blank" href="https://www.globo.com/">Access globo.com</a>', unsafe_allow_html=True)
Does this do the job for you?
Dinesh
I’m not talking about browser tab, its a tab container
Oh sorry for misunderstanding your question.I don’t believe that is supported. There’s an open issue: https://github.com/streamlit/streamlit/issues/233
Dinesh
Hello @Daniyal56,
This feature doesn’t exist yet in streamlit, but as @ddutt said, there’s an open GitHub issue.
It might not be ideal for your use case, but you could try to use st.beta_expander()
instead.
Some updates about tabs in streamlit:
- The github issue requesting it as a feature (also listed in above in this thread) is still open as of 2021-04-17:
- Another discuss.streamlit.io thread on the topic is here: Multiple tabs in streamlit - #3 by JayC
- 2 hacks are shared in that thread: one using bokeh and one using bootstrap + query parameters. The source code for the 2nd one is in the github issue thread