Checklist
Summary
Since Streamlit 1.52 (cool release by the way! ❤️ ), with st.navigation(position="top"), the navigation appears in both the top and sidebar.
Reproducible Code Example

import streamlit as st
def a():
st.header("Header A")
def b():
st.header("Header B")
st.sidebar.header("Sidebar Header")
st.navigation((a, b), position="top").run()
Steps To Reproduce
Try the above code example.
Expected Behavior
From the documentation:
If this is "top", the navigation appears in the top header of the app.
The navigation should only appear in the top bar, as it did in Streamlit 1.51.
Current Behavior
Since Streamlit 1.52, the navigation appears in both the top and sidebar.
Is this a regression?
Debug info
- Streamlit version: 1.52.0
- Python version: 3.11.9
- Operating System: MacOS
- Browser: Chrome
Additional Information
The position="sidebar" and position="hidden" seem to behave as expected.
Checklist
Summary
Since Streamlit 1.52 (cool release by the way! ❤️ ), with
st.navigation(position="top"), the navigation appears in both the top and sidebar.Reproducible Code Example
Steps To Reproduce
Try the above code example.
Expected Behavior
From the documentation:
The navigation should only appear in the top bar, as it did in Streamlit 1.51.
Current Behavior
Since Streamlit 1.52, the navigation appears in both the top and sidebar.
Is this a regression?
Debug info
Additional Information
The
position="sidebar"andposition="hidden"seem to behave as expected.