building-streamlit-multipage-apps

Build multi-page Streamlit apps with centralized navigation and per-page modules.

Updated Mar 7, 2026
One-click install
npx skills add https://github.com/randoneering/nix-flake-mirror --skill building-streamlit-multipage-apps-randoneering
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: building-streamlit-multipage-apps
Source: https://github.com/randoneering/nix-flake-mirror/tree/main/home/programs/opencode/skills/snowflake/developing-with-streamlit/skills/building-streamlit-multipage-apps
Command: npx skills add https://github.com/randoneering/nix-flake-mirror --skill building-streamlit-multipage-apps-randoneering

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Streamlit projects that span multiple pages often struggle with consistent navigation, shared global state, and clean page organization. This skill provides a clear structure and examples to build scalable, multi-page Streamlit apps without boilerplate.

Core Features & Use Cases

  • Centralized navigation shell and per-page modules under app_pages/
  • Shared global state management via a main module to initialize st.session_state
  • Per-page state handling and conditional page loading for role-based UIs
  • Use Case: Build a data dashboard with Home, Analytics, and Settings pages that share a common navigation and state.

Quick Start

Launch the app with streamlit run streamlit_app.py to explore the multi-page navigation.

Frequently Asked Questions about building-streamlit-multipage-apps

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build a multi-page Streamlit dashboard with consistent navigation?

Build a multi-page Streamlit dashboard by creating a centralized navigation shell using Streamlit's navigation API and organizing page modules into an app_pages directory. This structure provides consistent navigation and shared global state across pages.

How do I manage shared global state across multiple Streamlit pages?

Manage shared global state across multiple Streamlit pages by initializing st.session_state within a main module. This centralizes state management, allowing per-page modules to access shared global state consistently.

Can I implement role-based UI in a Streamlit multi-page app?

Implement role-based UI in a Streamlit multi-page app using conditional page loading and per-page state handling. The navigation shell restricts access to specific page modules based on user roles stored in global state.

What is the best way to structure a scalable multi-page Streamlit app?

Structure a scalable multi-page Streamlit app with a main module for global state initialization and an app_pages directory for individual page modules. This centralized navigation shell eliminates boilerplate and separates page logic.

Do I need external dependencies to manage multi-page navigation in Streamlit?

No external dependencies are required to manage multi-page navigation in Streamlit. The setup uses Streamlit's native navigation API and session state management to build the app shell and handle per-page state.