MorphUI is a creative and flexible UI extension for Kivy, designed to provide developers with a modern and customizable set of components for building beautiful user interfaces. Unlike KivyMD, MorphUI is not bound to Material Design principles, allowing for greater freedom in design and styling.
Project description
MorphUI
MorphUI is a creative and flexible UI extension for Kivy, designed to provide developers with a modern and customizable set of components for building beautiful user interfaces. Unlike KivyMD, MorphUI is not bound to Material Design principles, allowing for greater freedom in design and styling.
Features
- 🎨 Flexible Design: Not bound to Material Design - create your own visual style
- 🧩 Modern Components: Button, Label, Card, TextInput with contemporary styling
- 🎯 Theme System: Light/Dark themes with easy customization
- ⚡ Smooth Animations: Built-in animations for interactive elements
- 📱 Cross-Platform: Works on desktop, mobile, and web (via Kivy)
- 🔧 Easy Integration: Simple drop-in replacement for standard Kivy widgets
Installation
From PyPI (when published)
pip install morphui
From Source
git clone https://github.com/j4ggr/MorphUI.git
cd MorphUI
pip install -e .
Quick Start
from kivy.app import App
from kivy.uix.boxlayout import BoxLayout
from morphui.uix.button import MorphButton
from morphui.uix.label import MorphLabel
from morphui.uix.card import MorphCard
class MyApp(App):
def build(self):
layout = BoxLayout(orientation='vertical', padding=20, spacing=10)
# Add a modern card
card = MorphCard()
# Add components to the card
title = MorphLabel(text="Welcome to MorphUI!", text_style="headline")
button = MorphButton(text="Get Started", button_style="filled")
card.add_widget(title)
card.add_widget(button)
layout.add_widget(card)
return layout
MyApp().run()
Components
MorphButton
Modern button with multiple styles and animations:
from morphui.uix.button import MorphButton
# Filled button (default)
btn1 = MorphButton(text="Filled", button_style="filled")
# Outlined button
btn2 = MorphButton(text="Outlined", button_style="outlined")
# Text button
btn3 = MorphButton(text="Text", button_style="text")
MorphLabel
Enhanced label with typography system:
from morphui.uix.label import MorphLabel
# Different text styles
title = MorphLabel(text="Title", text_style="headline")
body = MorphLabel(text="Body text", text_style="body")
caption = MorphLabel(text="Caption", text_style="caption")
MorphCard
Container with modern styling and elevation:
from morphui.uix.card import MorphCard
card = MorphCard(
elevation=4,
corner_radius=16
)
MorphTextInput
Modern text input with focus states:
from morphui.uix.textinput import MorphTextInput
text_input = MorphTextInput(
hint_text="Enter text here",
corner_radius=8
)
# Error state
text_input.set_error("This field is required")
Theme System
MorphUI includes a comprehensive theme system:
from morphui.theme.styles import theme_manager
# Switch themes
theme_manager.current_theme = "dark" # or "light"
# Access theme colors
colors = theme_manager.colors
primary_color = colors.PRIMARY
# Access typography
typography = theme_manager.typography
title_style = typography.get_text_style("title")
Custom Themes
Create your own themes:
from morphui.theme.colors import ColorPalette
from morphui.theme.typography import Typography
class MyColorPalette(ColorPalette):
PRIMARY = [0.8, 0.2, 0.4, 1.0] # Custom red
SECONDARY = [0.2, 0.8, 0.4, 1.0] # Custom green
# Register custom theme
theme_manager.register_theme(
"custom",
MyColorPalette,
Typography,
"My Custom Theme"
)
theme_manager.current_theme = "custom"
Examples
Check out the examples/ directory for complete sample applications:
basic_example.py- Showcase of all components- More examples coming soon!
Development
Setting up Development Environment
git clone https://github.com/j4ggr/MorphUI.git
cd MorphUI
pip install -e ".[dev]"
Running Examples
cd examples
python basic_example.py
Roadmap
- Additional components (Switch, Slider, Progress Bar, etc.)
- Advanced animations and transitions
- More built-in themes
- Comprehensive documentation website
- Testing suite
- Performance optimizations
Contributing
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments
- Inspired by KivyMD but designed for greater design flexibility
- Built on top of the excellent Kivy framework
- Thanks to all contributors and the Kivy community
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 morphui-0.1.0.tar.gz.
File metadata
- Download URL: morphui-0.1.0.tar.gz
- Upload date:
- Size: 3.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: pdm/2.25.9 CPython/3.12.3 Windows/11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
766072aadffd532e8c20a8dc6fae94c5123e494ed5c7a5e95b39796db24bda1d
|
|
| MD5 |
879e6c1e61ee5c4b34a978590d976737
|
|
| BLAKE2b-256 |
5439c105dc053e25e113980d4217e074a87f7db67b73617fd5979a88157321ce
|
File details
Details for the file morphui-0.1.0-py3-none-any.whl.
File metadata
- Download URL: morphui-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: pdm/2.25.9 CPython/3.12.3 Windows/11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4eb9cf13888fefc31aae13c25e676e8f3d84a1889fbb51a3d36d43f160b06b5b
|
|
| MD5 |
24a97bd8ee0f6e1d753df667d5488116
|
|
| BLAKE2b-256 |
8dd8dc8396ff6032837c20cefc3e62f909529cc9be87c0fbe9cd0ce882174611
|