pages in the same directory as your main entrypoint script.
1. Project Structure
Streamlit automatically detects any.py file inside the pages/ folder and displays them in the sidebar:
2. How it Works
- Sidebar Ordering: Streamlit sorts the files alphabetically. Prefix files with numbers (e.g.,
1_,2_) to enforce a custom order. - Display Names: Streamlit cleans up the file names in the sidebar automatically (e.g.,
1_📊_Dashboard.pywill display as📊 Dashboardby removing numbers, underscores, and file extensions). - Run the App: Always run the main entry point: