Skip to main content

A Streamlit component that animates a polar bear running across the screen on each rerun

Project description

🐻‍❄️ streamlit-rerun-bear

Turns every Streamlit rerun into a polar bear dash across your screen.

A lightweight Streamlit custom component (CCv2) that animates a polar bear running along the bottom of the page on every rerun — left to right, then right to left, alternating each time.

demo


Installation

pip install streamlit-rerun-bear

Quick Start

import streamlit as st
from streamlit_rerun_bear import streamlit_rerun_bear

streamlit_rerun_bear()

st.button("🔄 Rerun")

That's it. Every time the app reruns, a polar bear dashes across the bottom of the screen.


How It Works

  • Rendered on a position: fixed canvas that stays pinned to the bottom of the viewport — even while scrolling.
  • pointer-events: none ensures the bear never blocks clicks or interactions.
  • Direction alternates on each rerun (left → right → left → …).
  • If a rerun happens mid-animation, the bear picks up from where it left off.

Requirements

  • Python ≥ 3.9
  • Streamlit ≥ 1.40.0
  • Pillow ≥ 9.0.0
  • NumPy ≥ 1.24.0

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

streamlit_rerun_bear-0.1.2.tar.gz (976.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

streamlit_rerun_bear-0.1.2-py3-none-any.whl (975.2 kB view details)

Uploaded Python 3

File details

Details for the file streamlit_rerun_bear-0.1.2.tar.gz.

File metadata

  • Download URL: streamlit_rerun_bear-0.1.2.tar.gz
  • Upload date:
  • Size: 976.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for streamlit_rerun_bear-0.1.2.tar.gz
Algorithm Hash digest
SHA256 b2eb7c762ab3fb67b3f2091a8146dba76f2995b7e0b62a13ea12553b2628abd9
MD5 ab4fe6ddfe0824855be609deea9854f4
BLAKE2b-256 91b09d99b82568b4c68d857f131974fa98dd6c806b1e9c0c0128f9f886f68b43

See more details on using hashes here.

File details

Details for the file streamlit_rerun_bear-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for streamlit_rerun_bear-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 0f26e60b94f0e1f4a7010a822c51fcf198bbefb33d8f989c10acdb947e16532e
MD5 a10c008f41c712aa856a4694ef273c59
BLAKE2b-256 0dbe4b46642e7a5e0dfae28ad6801108b1e9a41bab638bec0a7f5f16e5979264

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page