Use st.set_page_config to make a dense Streamlit dashboard use available screen space instead of leaving the content centered with wide blank margins. section 6.3.1
Place the call immediately after the imports and before every other Streamlit command. The wide layout is especially useful when a dashboard displays several filter controls across the page. section 6.3.1
Expand a dashboard to a wide layout
import streamlit as st from data_wrangling import prep_data st.set_page_config(layout="wide") data = prep_data() filter_panel(data) section 6.3.1
Keep these implementation points in mind:
- Call st.set_page_config only as the first Streamlit command executed by the app. section 6.3.1
- Use layout="wide" when horizontally dense content needs more room than the default centered layout provides. section 6.3.1
- A wide layout complements a filter panel with several columns and produces a more usable dashboard presentation. section 6.3.1
