gcPanel for Streamlit
A powerful and flexible panel component library for Streamlit applications, enabling rich dashboard creation with minimal code.
Modular Components
Build complex dashboards with reusable, configurable panel components that integrate seamlessly with Streamlit.
Responsive Design
All components are mobile-friendly and adapt beautifully to different screen sizes and devices.
Customizable Themes
Easily customize colors, fonts, and styling to match your brand or application requirements.
Rich Visualizations
Support for various chart types, tables, and interactive widgets to display your data effectively.
Simple API
Intuitive Python API that feels natural to Streamlit developers with minimal learning curve.
High Performance
Optimized for speed with efficient rendering and minimal overhead for production applications.
Key Benefits
- Rapid Development: Build complex dashboards with minimal code
- Professional Appearance: Beautiful, consistent styling out of the box
- Responsive Design: Automatically adapts to different screen sizes
- Easy Integration: Drop-in replacement for standard Streamlit components
- Customizable: Extensive theming and configuration options
Installation
Quick Install
Install gcPanel-Streamlit using pip:
pip install gcpanel-streamlit
Development Installation
For development or to get the latest features:
git clone https://github.com/ibuilder/gcPanel-Streamlit.git
cd gcPanel-Streamlit
pip install -e .
Requirements
- Python 3.7+
- Streamlit 1.0+
- pandas
- plotly (optional, for advanced charts)
Verification
To verify your installation, run:
import gcpanel as gcp
print(gcp.__version__)
Quick Start
Basic Usage
Create your first gcPanel dashboard in just a few lines:
import streamlit as st
import gcpanel as gcp
import pandas as pd
# Create sample data
data = pd.DataFrame({
'Month': ['Jan', 'Feb', 'Mar', 'Apr', 'May'],
'Sales': [1000, 1200, 1100, 1300, 1500]
})
# Create dashboard layout
st.title("My Dashboard")
# Create panels using gcPanel
with gcp.panel("Revenue Overview", width=12):
col1, col2, col3 = st.columns(3)
with col1:
gcp.metric_card("Total Sales", "$6,100", "+15%")
with col2:
gcp.metric_card("Avg Sale", "$1,220", "+8%")
with col3:
gcp.metric_card("Growth Rate", "15%", "+2%")
# Chart panel
with gcp.panel("Sales Trend", width=8):
st.line_chart(data.set_index('Month'))
# Stats panel
with gcp.panel("Quick Stats", width=4):
st.metric("Orders", "234", "12")
st.metric("Customers", "189", "8")
st.metric("Revenue", "$6,100", "15%")
Configuration
Configure theme settings at the start of your app:
import gcpanel as gcp
# Configure theme
gcp.configure_theme(
primary_color="#1976D2",
background_color="#FAFAFA"
)
Panel Components
Basic Panel
The core component for organizing content:
with gcp.panel("Panel Title", width=6):
st.write("Content goes here")
Panel with Custom Height
with gcp.panel("Fixed Height Panel", width=6, height=400):
st.write("This panel has a fixed height")
Panel Configuration Options
- width: Grid width (1-12 columns)
- height: Fixed height in pixels
- collapsible: Makes panel collapsible
- background_color: Custom background color
- border_color: Custom border color