Updating Object Heights in Sidebar

You can use a CSS selector to modify that minimum area for the list of pages.

import streamlit as st

if st.sidebar.checkbox("Make room"):
    st.sidebar.markdown("""
        <style>
        [data-testid='stSidebarNav'] > ul {
            min-height: 60vh;
        } 
        </style>
        """, unsafe_allow_html=True)

"# Title of app"
"Some repeated content"*100

with st.sidebar:
    for i in range(5):
        st.button(f"Button {i}", use_container_width=True)
1 Like