victoryhb / streamlit-option-menu

streamlit-option-menu is a simple Streamlit component that allows users to select a single item from a list of options in a menu.
MIT License
605 stars 69 forks source link

Override multipage app side bar #58

Open tombeteende opened 9 months ago

tombeteende commented 9 months ago

I have a multi-page app where all the pages besides the main page are under /pages.

I want to override the default sidebar with the a horizontal option menu.

What is the best way to do it?

CHerSun commented 9 months ago

stpages

fgdvir commented 9 months ago

I'm not sure exactly how this is related to the streamlit-option-menu. But in general it is streamlit behavior to automatically create the sidebar if you put your pages in a pages dir. if you want to use the menu instead, just rename that dir and then using an if/else or match/case just decide what to load (which page to show)