liveBook · Manning

Dialog element

As explained in Build Python Web Apps with Streamlit

A modal dialog is an interface panel that temporarily blocks interaction with the underlying content until the dialog is completed or dismissed.

A modal dialog is an overlay that temporarily blocks interaction with the underlying interface until the user dismisses it. Use it to keep advanced tasks, such as dashboard drill-downs, separate from the main view while keeping them easy to access. section 7.5.1

In Streamlit, st.dialog is a decorator rather than a container widget. Decorating a function renders that function’s content in a popup. The function can receive data, set a small or large width, and combine tabs or other widgets inside the dialog. section 7.5.1

Dashboard drill-down dialog

Define a Drilldown dialog that accepts main_df and compare_df, displays them in Main and Compare tabs, and invokes it when the user presses a Drilldown button. The dialog presents the raw filtered data without crowding the primary dashboard.

How Build Python Web Apps with Streamlit covers it

How deep it goes
Defines modal behavior and demonstrates decorators, width, arguments, tabs, dataframes, and button triggering; it stops at a basic raw view.
Examples
Demonstrates a Drilldown popup with Main and Compare tabs displaying two filtered pandas dataframes.
What it assumes
Assumes a Streamlit dashboard, filtered pandas dataframes, and basic widget use; teaches modal placement and triggering.
What you can do after
Build it from scratch by decorating a function with st.dialog and invoking it from a dashboard button.
How it connects
Connects modal dialogs with Streamlit decorators, tabs, pandas dataframes, containers, buttons, and dashboard drill-down views.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Build Python Web Apps with Streamlit. The section links point to the parts of the book it draws on.