Metadata-Version: 2.4
Name: streamlit-carbon-button
Version: 1.3.0
Summary: Carbon Design System buttons for Streamlit
Home-page: https://github.com/yourusername/streamlit-carbon-button-dev
Author: Your Name
Author-email: Your Name <your.email@example.com>
Maintainer-email: Your Name <your.email@example.com>
License-Expression: MIT
Project-URL: Homepage, https://github.com/yourusername/streamlit-carbon-button-dev
Project-URL: Documentation, https://github.com/yourusername/streamlit-carbon-button-examples
Project-URL: Repository, https://github.com/yourusername/streamlit-carbon-button-dev
Project-URL: Issues, https://github.com/yourusername/streamlit-carbon-button-dev/issues
Project-URL: Examples, https://github.com/yourusername/streamlit-carbon-button-examples
Keywords: streamlit,carbon,design-system,buttons,ui,components
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Software Development :: User Interfaces
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
License-File: NOTICE
Requires-Dist: streamlit>=1.0.0
Dynamic: author
Dynamic: home-page
Dynamic: license-file
Dynamic: requires-python

# Streamlit Carbon Button

Beautiful Carbon Design System buttons for your Streamlit apps! 🎨

![Carbon Buttons](https://img.shields.io/badge/Carbon%20Design-System-blue)
![Streamlit](https://img.shields.io/badge/Streamlit-Compatible-red)
![PyPI](https://img.shields.io/pypi/v/streamlit-carbon-button)

## Features

- 🎯 **Carbon Design System** - Professional IBM design language
- 🎨 **4 Button Types** - Primary, Secondary, Danger, and Ghost
- 🔧 **100+ Carbon Icons** - Extensive library of pre-integrated SVG icons
- ✨ **Default Button** - Teal shadow indicator for primary actions
- 📱 **Responsive** - Adapts to container width
- 🌓 **Dark Mode** - Automatic theme detection
- ♿ **Accessible** - Keyboard navigation and screen reader support

## Installation

```bash
pip install streamlit-carbon-button
```

## Quick Start

```python
import streamlit as st
from streamlit_carbon_button import carbon_button, CarbonIcons

# Simple button
if carbon_button("Click me!"):
    st.success("Button clicked!")

# Button with icon
if carbon_button("Save", icon=CarbonIcons.SAVE):
    st.success("Saved!")

# Default button with teal shadow
if carbon_button("Submit", is_default=True):
    st.balloons()
```

## Button Types

```python
# Primary (default) - Subtle grey
carbon_button("Primary", button_type="primary")

# Secondary - With border
carbon_button("Secondary", button_type="secondary")

# Danger - Red accent
carbon_button("Delete", button_type="danger")

# Ghost - Minimal style
carbon_button("Cancel", button_type="ghost")
```

## Icons

All 18 available Carbon icons:

```python
CarbonIcons.ADD        CarbonIcons.CLOSE      CarbonIcons.COPY
CarbonIcons.DELETE     CarbonIcons.DOWNLOAD   CarbonIcons.UPLOAD
CarbonIcons.SAVE       CarbonIcons.SEARCH     CarbonIcons.SETTINGS
CarbonIcons.FILTER     CarbonIcons.HOME       CarbonIcons.INFO
CarbonIcons.WARNING    CarbonIcons.SUCCESS    CarbonIcons.HELP
CarbonIcons.DOCUMENT   CarbonIcons.CHART_BAR  CarbonIcons.PLAY
```

## Default Button Feature

Mark important actions with a subtle teal shadow:

```python
col1, col2 = st.columns(2)

with col1:
    if carbon_button("Save", is_default=True):
        st.success("Saved!")
        
with col2:
    if carbon_button("Cancel", button_type="ghost"):
        st.info("Cancelled")
```

## Advanced Examples

### Icon-Only Buttons

```python
# Perfect for toolbars
cols = st.columns(4)

with cols[0]:
    if carbon_button("", icon=CarbonIcons.ADD):
        st.info("Add")
        
with cols[1]:
    if carbon_button("", icon=CarbonIcons.EDIT):
        st.info("Edit")
```

### Dynamic Default Buttons

```python
# Change default based on state
is_edited = st.session_state.get('edited', False)

if carbon_button("Save", is_default=is_edited):
    st.success("Saved!")
    st.session_state.edited = False
```

### Full Width Buttons

```python
if carbon_button("Submit Application", use_container_width=True):
    st.success("Submitted!")
```

## API Reference

```python
carbon_button(
    label: str,                       # Button text
    key: str = None,                  # Unique key
    button_type: str = "primary",     # primary|secondary|danger|ghost
    icon: str = None,                 # Icon from CarbonIcons
    disabled: bool = False,           # Disable state
    use_container_width: bool = False,# Full width
    is_default: bool = False,         # Teal shadow indicator
) -> bool                             # True when clicked
```

## Links

- 📚 [Examples Repository](https://github.com/yourusername/streamlit-carbon-button-examples)
- 🛠️ [Development Repository](https://github.com/yourusername/streamlit-carbon-button-dev)
- 🐛 [Issue Tracker](https://github.com/yourusername/streamlit-carbon-button-dev/issues)
- 📖 [Carbon Design System](https://carbondesignsystem.com/)

## License

MIT License - see [LICENSE](https://github.com/yourusername/streamlit-carbon-button-dev/blob/main/LICENSE) for details.

Carbon Design System icons are used under Apache 2.0 License.
