Streamlit supports series of status elements . However if time limit for dispaly for the following elements [st.error, st.warning,st.info,st.success] is added as an additional parameters then it would greatly enhance the functionality of the status elements. Any thoughts on this?
There is a plan on the Streamlit roadmap to include Toast notifications, which I think is similar to what you’re suggesting.
I’m not sure if st.error and st.warning will ever be able to disappear on their own, but you can probably achieve most of what you want today with the st.empty layout option and a timer. I like to call it toast
in this case:
import streamlit as st
import time
toast = st.empty()
toast.success('HOORAY 🎈')
time.sleep(3)
toast.warning('BOO')
I will try this. Thanks
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.