Display progress and status

Streamlit provides a few methods that allow you to add animation to your apps. These animations include progress bars, status messages (like warnings), and celebratory balloons.

screenshot

Progress bar

Display a progress bar.

for i in range(101):
  st.progress(i)
  do_something_slow()
screenshot

Spinner

Temporarily displays a message while executing a block of code.

with st.spinner("Please wait..."):
  do_something_slow()
screenshot

Balloons

Display celebratory balloons!

do_something()

# Celebrate when all done!
st.balloons()
screenshot

Error box

Display error message.

st.error("We encountered an error")
screenshot

Warning box

Display warning message.

st.warning("Unable to fetch image. Skipping...")
screenshot

Info box

Display an informational message.

st.info("Dataset is updated every day at midnight.")
screenshot

Success box

Display a success message.

st.success("Match found!")
screenshot

Exception output

Display an exception.

e = RuntimeError("This is an exception of type RuntimeError")
st.exception(e)

Was this page helpful?

editSuggest edits
forum

Still have questions?

Our forums are full of helpful information and Streamlit experts.