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.1.tar.gz (976.5 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.1-py3-none-any.whl (975.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: streamlit_rerun_bear-0.1.1.tar.gz
  • Upload date:
  • Size: 976.5 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.1.tar.gz
Algorithm Hash digest
SHA256 000e2199ab3a35a7d0dc96f543868f7d16fcdb0fc02cb041062dcc33d47326db
MD5 356d1e9417469bc606031167f454c51d
BLAKE2b-256 aa853407e222062e606d54f7377853d5d080f31ef9e4e5979cf7358f78e24527

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for streamlit_rerun_bear-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a19201f9f97164f02bded2f17dd18d434277d07948e7a752cc1973f576f61a24
MD5 92789aa57f54b8c1742fc4d7a1a32097
BLAKE2b-256 a84f05e995cddb92f2a6946512fca0f09aecfbb9d55539501e86dfca3e17854b

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