Use progress bars or spinners to visualize loading status in your notebooks and apps. Useful when iterating over collections or loading data from files, databases, or APIs.

Progress bar#

You can display a progress bar while iterating over a collection, similar to tqdm.

marimo.status.progress_bar(collection: Collection[S | int], *, title: str | None = None, subtitle: str | None = None, completion_title: str | None = None, completion_subtitle: str | None = None) Iterable[S | int]#

Iterate over a collection and show a progress bar


for i in mo.status.progress_bar(range(10)):

You can optionally provide a title and subtitle to show during iteration, and a title/subtitle to show upon completion.


  • collection: a collection to iterate over

  • title: optional title

  • subtitle: optional subtitle

  • completion_title: optional title to show during completion

  • completion_subtitle: optional subtitle to show during completion


An iterable object that wraps collection


marimo.status.spinner(title: str | None = None, subtitle: str | None = None, remove_on_exit: bool = True) Iterator[Spinner]#

Show a loading spinner

Use mo.status.spinner() as a context manager to show a loading spinner. You can optionally pass a title and subtitle.


with mo.status.spinner(subtitle="Loading data ...") as _spinner:
    data = expensive_function()
    _spinner.update(subtitle="Crunching numbers ...")



  • title: optional title

  • subtitle: optional subtitle

  • remove_on_exit: if True, the spinner is removed from output on exit