Expandable tabs in sidebar

I am running my app locally. I have different pages in my application inside the pages folder. I have subpages for those pages. I looked at some docs about multipage application in streamlit and named the pages in the following way.:

 - pages
   - 0_PAGE1.py
   - 1_PAGE2.py
      - 3_ •Subpage1.py
      - 4_ •Subpage2.py
   - 5_PAGE3.py
...and so on...

The pages are shown in the sidebar correctly. But I want the main pages to be able to expand and unexpand and revealing and hiding the subpages in the process. Basically, I want something like this:


Is it possible?

2 Likes

Hi @Ashutosh_Chapagain

You might be interested in using st_pages component which allows you to group sub-pages under section pages.

Check out the component here:

Hope this helps!