Add tab dynamically

Hello everyone,
I am looking for a way to add a tab to an existaing tab tuple.
For example :

tabs = st.tabs([“Selection”, “results”])

And I would like to add a new tab like :


to have tabs updated and equivalent to :

tabs = st.tabs([“Selection”, “results”, “newtab”])

Any idea ?

Hey @dnaura, you can achieve that by using sessions state. In our demo app for tabs, we are also adding tabs dynamically. You can have a look at the code here.

1 Like

Thanks a lot!
I will give it a try!