streamlit-navigation-bar
streamlit-navigation-bar copied to clipboard
Make it work together with Multipage v2
Checklist
- [X] I have searched the existing issues for similar feature requests.
- [X] I added a descriptive title and summary to this issue.
Summary
I would like to add a navigation bar to the top of my page, but still be able to use the new multipage v2 functionality to have some pages in the sidebar also.
Why?
This would enable me to split pages into groups by type, and still minimize the options in the sidebar so it does not need to collapse.
How?
How I would like to do this would be something like
from streamlit_navigation_bar import st_navbar
page = st_navbar(["Home", "Processes", "Tools"])
home = [
st.Page(
page/home.py, title="Welcome", icon=":material/home:", url_path="welcome"
)
]
processes = [
st.Page(
page/process1.py,
title="Process1",
icon=":material/minimize:",
url_path="process1"
),
st.Page(
page/process2.py,
title="Process2",
icon=":material/minimize:",
url_path="process2"
),
]
tools = [
st.Page(
"page/Tools.py", title="Tools", icon=":material/construction:", url_path="tools",
st.Page(
"page/About.py", title="About", icon=":material/info:", url_path="about"
)
]
if page == "Home":
pg = st.navigation(home)
elif page == "Processes":
pg = st.navigation(processes)
elif page == "Tools":
pg = st.navigation(tools)
pg.run()
Additional context
No response