Checklist
Summary
Add a way to render the rows of a dataset (dataframe or any data structure supported by st.dataframe) using different layouts — e.g. list, gallery/cards, board (kanban), and timeline — similar to how Notion can display the same database as a table, gallery, list, board, or timeline. Today st.dataframe only offers the interactive table layout.
Why?
The interactive table is great for tabular data, but many datasets are better presented as cards/galleries (e.g. products, images, profiles), lists, kanban boards (grouped by a status column), or timelines (by a date column). Building these today requires a lot of manual layout work with columns/containers/HTML. A first-class element would make rich, non-tabular data presentations a one-liner and reuse the existing dataframe data handling and column config.
How?
Preferred — a single st.data_viewer command with a layout option:
st.data_viewer(df, layout="gallery" | "list" | "board" | "timeline" | "table")
This keeps everything in one element (one command to learn, one place for shared params) without overloading st.dataframe, while still exposing all layouts via a single layout argument.
Other API ideas that were considered (from internal specs):
Option A — a layout parameter on st.dataframe:
st.dataframe(df, layout="table" | "list" | "gallery" | "board" | "timeline")
Option B — dedicated commands per layout:
st.data_gallery(df) # card/gallery view
st.data_list(df) # list view
st.data_board(df) # kanban board (grouped by a column)
Notes:
- Reuse the same data inputs and
column_config as st.dataframe (e.g. which columns act as the image, title, subtitle, group-by / status, or date field).
- Overlaps with the "image cards" idea and could share infrastructure.
Additional Context
Checklist
Summary
Add a way to render the rows of a dataset (dataframe or any data structure supported by
st.dataframe) using different layouts — e.g. list, gallery/cards, board (kanban), and timeline — similar to how Notion can display the same database as a table, gallery, list, board, or timeline. Todayst.dataframeonly offers the interactive table layout.Why?
The interactive table is great for tabular data, but many datasets are better presented as cards/galleries (e.g. products, images, profiles), lists, kanban boards (grouped by a status column), or timelines (by a date column). Building these today requires a lot of manual layout work with columns/containers/HTML. A first-class element would make rich, non-tabular data presentations a one-liner and reuse the existing dataframe data handling and column config.
How?
Preferred — a single
st.data_viewercommand with alayoutoption:This keeps everything in one element (one command to learn, one place for shared params) without overloading
st.dataframe, while still exposing all layouts via a singlelayoutargument.Other API ideas that were considered (from internal specs):
Option A — a
layoutparameter onst.dataframe:Option B — dedicated commands per layout:
Notes:
column_configasst.dataframe(e.g. which columns act as the image, title, subtitle, group-by / status, or date field).Additional Context