Temporarily displays a message while executing a block of code.

Function signature[source]

st.spinner(text="In progress...")

Parameters

text (str)

A message to display while executing that block

Example

import time
import streamlit as st

with st.spinner('Wait for it...'):
    time.sleep(5)
st.success("Done!")
forum

Still have questions?

Our forums are full of helpful information and Streamlit experts.