Metadata-Version: 2.4
Name: streamlit-rerun-bear
Version: 0.1.2
Summary: A Streamlit component that animates a polar bear running across the screen on each rerun
License-Expression: MIT
Project-URL: Homepage, https://github.com/gussan-me/streamlit_rerun_bear
Project-URL: Repository, https://github.com/gussan-me/streamlit_rerun_bear
Project-URL: Bug Tracker, https://github.com/gussan-me/streamlit_rerun_bear/issues
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: streamlit>=1.40.0
Requires-Dist: Pillow>=9.0.0
Requires-Dist: numpy>=1.24.0
Provides-Extra: dev
Requires-Dist: pandas; extra == "dev"
Requires-Dist: pytest-playwright; extra == "dev"
Dynamic: license-file

# 🐻‍❄️ streamlit-rerun-bear

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

A lightweight [Streamlit](https://streamlit.io) 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](https://raw.githubusercontent.com/gussan-me/streamlit_rerun_bear/main/demo.gif)

---

## Installation

```bash
pip install streamlit-rerun-bear
```

## Quick Start

```python
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
