Programmatically navigating between pages in multipage app

Hi,

I’m using the multipage functionality and have a couple of pages showing in the sidebar navigation. Is there a way to switch to a page from an event on another page. For example, a user selects an item in a list on one page, then can push a button to view that item in detail - which would be laid out on one of the other pages.

Thanks in advance.

Hi @dave51c,

This isn’t natively supported yet, but there’s an open GitHub Issue for it here – feel free to add your thoughts to that discussion

Caroline

2 Likes

I am using the super useful function by streamlit-extras
https://extras.streamlitapp.com/Switch%20page%20function

does exactly what you’re describing

4 Likes

Hi @Caroline

Looks like folks are on it! Thanks to all for future progress.

Hi @alonsh

Thanks so much for heads up on this - it looks like a solution for now! My boss will be pleased :smile:
Some other cool extras in there that I am keen to try.

1 Like

Super helpful thanks!

Hey @dave51c!

Just wanted to update that with release 1.30.0 you can now natively program page switching using st.switch_page() as well as disable the sidebar navigation. :balloon:

More info in the docs . Looking forward to hearing what you think!

1 Like

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