Thanks to visit codestin.com
Credit goes to github.com

Skip to content

With st.navigation(position="top"), the navigation appears in both the top and sidebar. #13224

@JosephMarinier

Description

@JosephMarinier

Checklist

  • I have searched the existing issues for similar issues.
  • I added a very descriptive title to this issue.
  • I have provided sufficient information below to help reproduce this issue.

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

Open in Streamlit Cloud

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.

Image

Current Behavior

Since Streamlit 1.52, the navigation appears in both the top and sidebar.

Image

Is this a regression?

  • Yes, this used to work in a previous version.

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature:st.navigationRelated to `st.navigation`priority:P1High priority - fix within two weeksstatus:confirmedBug has been confirmed by the Streamlit teamtype:bugSomething isn't working as expected

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions