Add your description here
Project description
panel-siemens-ix
A Siemens Industrial Experience (iX) compliant theme library for panel-material-ui.
Screenshots
Below are visual examples of the Siemens iX theme in both light and dark modes:
| Light Theme | Dark Theme |
|---|---|
Purpose
panel-siemens-ix provides a comprehensive theme solution for applications built with panel-material-ui, ensuring they adhere to the strict design guidelines of Siemens iX Open Source Design. This library offers a seamless way to integrate the distinct visual language of Siemens iX into your Panel applications, making it easier to develop consistent and high-quality user interfaces.
Key Features
- Full Siemens iX Open Source Design Compliance: Adheres to the official Siemens iX design guidelines, including:
- Color Palette: Accurate implementation of iX color specifications for both light and dark themes, including hover and active states.
- Typography: Correct font families, sizes, and weights for headings and body text.
- Spacing: Consistent use of spacing units to ensure visual harmony.
- Component Styling: Theming of common Material-UI components (e.g., Buttons, Chips, TextFields, Paper, AppBar) to match iX aesthetics.
- Light and Dark Themes: Supports both light and dark modes, allowing users to switch between preferred visual styles.
- Seamless Integration: Designed to work effortlessly with
panel-material-ui, extending its capabilities with iX-specific styling.
Installation
You can install panel-siemens-ix using pip:
pip install panel-siemens-ix
Or with uv:
uv pip install panel-siemens-ix
Quick Start
The easiest way to get started is using the configure() function for complete setup:
import panel as pn
import panel_material_ui as pmui
from panel_siemens_ix import configure
# Apply complete Siemens iX configuration
configure()
# Enable Panel extensions
pn.extension()
# Create your app with Material UI components
app = pmui.Page(
title="My Siemens iX App",
main=[
pmui.Button(name="Primary Action", button_type="primary"),
pmui.TextInput(name="Input Field", placeholder="Enter text..."),
pmui.Alert(object="Welcome to Siemens iX!", alert_type="success")
],
theme_toggle=True # Enable light/dark theme switching
)
app.servable()
Usage Examples
1. Basic Application
import panel as pn
import panel_material_ui as pmui
from panel_siemens_ix import configure
# Apply Siemens iX configuration
configure()
pn.extension()
# Simple app with Material UI components
def create_basic_app():
return pmui.Container(
pmui.Typography("Welcome to Siemens iX", variant="h4"),
pmui.Button(
name="Get Started",
button_type="primary",
icon="rocket_launch"
),
pmui.TextInput(
name="Your Name",
placeholder="Enter your name..."
)
)
# Serve the app
create_basic_app().servable()
2. Parameter-Driven Application (Recommended)
import panel as pn
import panel_material_ui as pmui
import param
from panel_siemens_ix import configure
configure()
pn.extension()
class MyApp(pn.viewable.Viewer):
"""Parameter-driven app following Panel best practices."""
# App parameters
text_input = param.String(default="Hello Siemens iX!")
number_value = param.Number(default=42, bounds=(0, 100))
def __init__(self, **params):
super().__init__(**params)
self._create_layout()
def _create_layout(self):
"""Create the app layout."""
self._layout = pmui.Container(
pmui.Typography("Parameter-Driven App", variant="h4"),
pmui.TextInput.from_param(
self.param.text_input,
name="Text Input"
),
pmui.FloatInput.from_param(
self.param.number_value,
name="Number Input"
),
pmui.Typography(
object=self.status_display,
variant="body1"
)
)
@param.depends("text_input", "number_value")
def status_display(self):
"""Reactive status display."""
return f"Current values: '{self.text_input}' and {self.number_value}"
def __panel__(self):
"""Return the layout for Panel."""
return self._layout
# Create and serve the app
MyApp().servable()
3. Using Custom Themes
For advanced customization, you can use the theme functions directly:
import panel as pn
import panel_material_ui as pmui
from panel_siemens_ix.theme import siemens_ix_light_theme, siemens_ix_dark_theme
pn.extension()
# Create a page with both light and dark themes
app = pmui.Page(
title="Custom Theme App",
main=[
pmui.Typography("Custom Siemens iX Theme", variant="h4"),
pmui.Button(name="Primary Button", button_type="primary"),
pmui.Alert(object="Themed with Siemens iX colors!", alert_type="info")
],
# Configure both themes
theme_config={
"light": siemens_ix_light_theme,
"dark": siemens_ix_dark_theme
},
theme_toggle=True
)
app.servable()
Example Applications
The examples/ directory contains comprehensive example applications:
Basic Examples
minimal_app.py- Simplest possible Siemens iX appquick_start.py- Quick start template with common componentsshowcase_compact.py- Compact showcase of key components (fits without scrolling)component_showcase.py- Comprehensive showcase of Material UI componentstheme_switching.py- Light/dark theme switching demonstration
Application Examples
applications/dashboard.py- Industrial dashboard with KPIs and chartsapplications/data_form.py- Data entry form with validation
Utility Examples
utilities/color_palette_demo.py- Interactive color system explorer
Running Examples
# Run any example directly
python examples/basic/showcase_compact.py
# Or serve with Panel
panel serve examples/basic/showcase_compact.py --dev --show
# Other examples
python examples/basic/component_showcase.py
# View all examples
ls examples/
Each example demonstrates Panel best practices including:
- Parameter-driven architecture
- Reactive programming with
@param.depends - Proper Material UI component usage
- Siemens iX theming integration
Color System
The library includes a comprehensive color system with semantic colors for both light and dark themes:
from panel_siemens_ix.colors import get_colors, get_continuous_cmap, get_categorical_palette
# Get colors for current theme
colors = get_colors("light") # or "dark"
# Access semantic colors
primary_color = colors.primary["main"]
success_color = colors.success["main"]
warning_color = colors.warning["main"]
# Generate palettes for data visualization
categorical_palette = get_categorical_palette(dark_theme=False, n_colors=8)
continuous_colormap = get_continuous_cmap(dark_theme=False)
Available Color Categories
- Semantic Colors: primary, secondary, success, warning, error, info
- Component Colors: text, background, border, ghost
- Interactive States: main, hover, active, disabled
Configuration Options
Full Configuration
from panel_siemens_ix import configure
# Apply complete Siemens iX setup
configure()
This sets up:
- Siemens logos and branding
- Custom favicon
- Theme configuration
- Default component styles
- Panel-specific optimizations
Manual Theme Configuration
import panel_material_ui as pmui
from panel_siemens_ix.theme import siemens_ix_light_theme, siemens_ix_dark_theme
# Apply themes manually to a Page
app = pmui.Page(
theme_config={
"light": siemens_ix_light_theme,
"dark": siemens_ix_dark_theme
},
theme_toggle=True
)
Development
Project Structure
panel-siemens-ix/
├── src/panel_siemens_ix/
│ ├── __init__.py # Main configuration
│ ├── theme.py # Theme creation functions
│ ├── colors.py # Color system
│ └── static/ # Brand assets (logos, favicons)
├── examples/ # Example applications
│ ├── basic/ # Basic usage examples
│ ├── applications/ # Complete applications
│ └── utilities/ # Utility demonstrations
└── colors/ # Color extraction tools
Design Principles
panel-siemens-ix is built upon the core principles of the Siemens iX Open Source Design system, ensuring:
- Consistency: Provides a unified look and feel across your applications, reducing visual clutter and improving user recognition.
- Clarity: Emphasizes clear visual hierarchies and legible elements to enhance user comprehension and interaction.
- Usability: Focuses on intuitive and accessible design patterns to create a positive user experience.
By leveraging this library, developers can quickly and confidently create Panel applications that align with Siemens' brand identity and user experience standards.
Contribution Guidelines
Contributions are welcome! If you'd like to contribute to panel-siemens-ix, please refer to the project's CONTRIBUTING.md file (if available) or open an issue/pull request on the GitHub repository.
License
This project is licensed under the Apache 2.0 License. See the LICENSE file (if available) for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file panel_siemens_ix-0.2.7.tar.gz.
File metadata
- Download URL: panel_siemens_ix-0.2.7.tar.gz
- Upload date:
- Size: 567.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2378ae0cae53f8ed70ae5d96cc10e15dfd7f5fc918be70c4585be9ebff5feb48
|
|
| MD5 |
08e78823768de51a47de48f963c6bd4c
|
|
| BLAKE2b-256 |
5fc59254ed49db4e445f64c1c45986f930bb47550ff8b879a051ab660d3970cd
|
File details
Details for the file panel_siemens_ix-0.2.7-py3-none-any.whl.
File metadata
- Download URL: panel_siemens_ix-0.2.7-py3-none-any.whl
- Upload date:
- Size: 157.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1e89f22ae3f11dc715967fbc7ca247710e2fbab2bbc658e530f9ef59962b1cf8
|
|
| MD5 |
e0ca8f6c6a4629728a5cb59490ac2e1c
|
|
| BLAKE2b-256 |
5b332ba010f458596dcfa8a73b1f0bdab507029c9d8c6f3fc323ede4273f7d57
|