Skip to content

🏃‍♂️  Customize running

Submitted by koninhoo

Summary

Customize the running widget

Functions

center_running

Have the "running man" animation in the center of the screen instead of the top right corner.

Source code in src/streamlit_extras/customize_running/__init__.py
@extra
def center_running():
    """
    Have the "running man" animation in the center of the screen instead of the top right corner.
    """
    st.markdown(center_css, unsafe_allow_html=True)

Import:

from streamlit_extras.customize_running import center_running # (1)!
  1. You should add this to the top of your .py file 🛠

Examples

example

def example():
    click = st.button("Observe where the 🏃‍♂️ running widget is now!")
    if click:
        center_running()
        time.sleep(2)
Output (beta)