I am looking to use Streamlit multi-page app feature to prototype a web portal. Think of it as exposing a multi-sheet Excel model onto the web. The MultiPage function has lots of potential. I really like the page load mechanism. I’ve hacked something similar using NavBar menu link and QueryParam for pageID. But the pages reload and flash on each transition. However the multi-page function is missing some features I need. It’s getting close with some solutions provided by @blackary (thanks much). But don’t think I can use it yet. I also like to new st.tabs as menus.
Navigating to a page by hyperlink (like menu items). Same solution as above, may be with style override to make a button look like a link. Not sure if this will work.
An option to not show the sidebar by default. When I try to control it by CSS, it still flashes.
The workaround to control the page list on the sidebar is helpful. link
A menu bar at top similar to a web portal which I can specify which page to load when a menu item is clicked… (looking similar to this)
Sorry for so many questions. I’ve been researching for the last week as to what the best approach would be. I am looking at my NavBar+QueryParam hack, Hydralit framework, and multipage function. I would like to go with MultiPage if I can. Trying to decide quickly since I need to start implementing the actual content pages. Each of these options requires a slightly different framework to start.
I think the best option for a top navbar involves something like the suggestion, with html and css inserted via st.markdown. However, I believe that by default any links clicked will open in a new tab, and I’m not sure if there’s a workaround to avoid that. You might be able to accomplish the same thing by styling some buttons from your bullet #2.
to hide the sidebar. However when the “pages” folder exists, the sidebar automatically shows, then collapses. When the “pages” folder is not there, then I get the behavior I was hoping for. Is there any way around this?