Skip to content

Add a data viewer element to render dataset rows in different layouts (list, gallery, board, timeline) #16377

Description

@lukasmasuch

Checklist

  • I have searched the existing issues for similar feature requests.
  • I added a descriptive title and summary to this issue.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:layoutRelated to layout and positioningfeature:st.column_configRelated to column configuration functionalityfeature:st.dataframeRelated to the `st.dataframe` elementtype:enhancementRequests for feature enhancements or new features

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions