Temporarily displays a message while executing a block of code.
Function signature

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

Parameters

text (str)

A message to display while executing that block

Example

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

Was this page helpful?

editSuggest edits
forum

Still have questions?

Our forums are full of helpful information and Streamlit experts.