Metadata-Version: 2.4
Name: streamlit-rockyroad-tools
Version: 0.0.25
Summary: Streamlit RockyRoad Tools
Home-page: 
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: streamlit>=1.34
Provides-Extra: devel
Requires-Dist: wheel; extra == "devel"
Requires-Dist: pytest==7.4.0; extra == "devel"
Requires-Dist: playwright==1.39.0; extra == "devel"
Requires-Dist: requests==2.31.0; extra == "devel"
Requires-Dist: pytest-playwright-snapshot==1.0; extra == "devel"
Requires-Dist: pytest-rerunfailures==12.0; extra == "devel"
Dynamic: description
Dynamic: description-content-type
Dynamic: license-file
Dynamic: provides-extra
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# Streamlit Rocky Road Tools

A collection of custom Streamlit components and tools.

## Components

### st_notification_banner

A customizable notification bar component for Streamlit applications.

**Features:**
- Displays notification messages with optional "Learn more" links
- **HTML message support** - Rich text with tags like `<strong>`, `<em>`, `<p>`, etc.
- Persistent dismissal using localStorage
- Customizable styling with black background and styled buttons
- React + TypeScript implementation
- Full width layout within Streamlit constraints

**Installation:**
```bash
pip install streamlit-rockyroad-tools
```

**Usage:**
```python
import streamlit as st
from streamlit_rockyroad_tools import st_notification_banner

# Basic usage
st_notification_banner(
    message="This is a notification from our sponsors.",
    learn_more="https://example.com",
    key="my_notification"
)

# HTML message support
st_notification_banner(
    message="<p>Our new&nbsp;<strong>Widgets Incentive Program</strong>&nbsp;has launched!</p>",
    learn_more="https://example.com/parts",
    key="html_notification"
)

# Without Learn More button (learn_more is optional)
st_notification_banner(
    message="<p>Simple notification without a Learn More button.</p>",
    key="simple_notification"
)
```

## Development

Each component has its own frontend directory with React/TypeScript source code.

To develop the notification bar:
```bash
cd st_notification_banner/frontend
npm install
npm start
```

Then run your Streamlit app in another terminal:
```bash
streamlit run st_notification_banner/my_notification_banner_example.py
```
