๐จ A modern, beautiful, and feature-rich Tkinter UI framework for Python
Transform your Python desktop applications with stunning modern interfaces, advanced widgets, and effortless theming.
BetterTkinter revolutionizes Python GUI development by providing a modern, intuitive framework built on Tkinter's solid foundation. Create professional-grade desktop applications with minimal code and maximum visual impact.
๐ Feature | ๐จ Description |
---|---|
Modern Design | Beautiful, contemporary widgets that look native on all platforms |
Smart Theming | Light/Dark/Auto themes with customizable color schemes |
Advanced Widgets | Color pickers, dialogs, navigation bars, progress bars, and more |
Developer Friendly | Intuitive API, comprehensive documentation, rich examples |
Production Ready | Robust, tested, and used in real-world applications |
Cross Platform | Windows, macOS, and Linux support out of the box |
pip install bettertkinter
git clone https://github.com/Velyzo/BetterTkinter.git
cd BetterTkinter
pip install -e .
๐ก Tip: Use a virtual environment for better dependency management. See our Installation Guide for detailed instructions.
Get up and running in under 2 minutes:
from bettertkinter import BTk, BTkButton, BTkFrame, BTkLabel
# Create a modern window
app = BTk(title="๐จ My Beautiful App", theme="dark", geometry="500x350")
# Add a stylish frame
frame = BTkFrame(app, corner_radius=15)
frame.pack(fill="both", expand=True, padx=20, pady=20)
# Beautiful label
BTkLabel(frame, text="Welcome to BetterTkinter! ๐",
font_size=18).pack(pady=20)
# Modern buttons with different styles
BTkButton(frame, text="Primary Action", style="primary").pack(pady=5)
BTkButton(frame, text="Success Action", style="success").pack(pady=5)
BTkButton(frame, text="Warning Action", style="warning").pack(pady=5)
app.mainloop()
That's it! You now have a beautiful, modern GUI application.
Experience BetterTkinter's full power with our comprehensive demo:
# Run the main demo
python demo.py
# Or explore the demo folder
cd demo/
python advanced_demo.py
Our demo/
folder contains:
- Complete Applications - Full-featured apps showcasing real-world usage
- Component Demos - Individual widget demonstrations
- Theme Showcases - Different styling approaches
- Integration Examples - Working with databases, APIs, and more
Quick examples for common tasks:
๐ Form with Validation
from bettertkinter import BTk, BTkFrame, BTkLabel, BTkEntry, BTkButton, BTkDialog
class LoginForm(BTk):
def __init__(self):
super().__init__(title="Login", geometry="400x300", theme="light")
frame = BTkFrame(self)
frame.pack(fill="both", expand=True, padx=30, pady=30)
BTkLabel(frame, text="๐ Login", font_size=20).pack(pady=20)
self.username = BTkEntry(frame, placeholder_text="Username")
self.username.pack(fill="x", pady=10)
self.password = BTkEntry(frame, placeholder_text="Password", show="*")
self.password.pack(fill="x", pady=10)
BTkButton(frame, text="Login", style="primary",
command=self.login).pack(pady=20, fill="x")
def login(self):
if self.username.get() and self.password.get():
BTkDialog.show_success("Success", "Welcome back!")
else:
BTkDialog.show_error("Error", "Please fill all fields")
LoginForm().mainloop()
๐จ Color Picker App
from bettertkinter import BTk, BTkColorPicker, BTkLabel, BTkFrame
class ColorApp(BTk):
def __init__(self):
super().__init__(title="Color Studio", geometry="600x500")
frame = BTkFrame(self)
frame.pack(fill="both", expand=True, padx=20, pady=20)
BTkLabel(frame, text="๐จ Color Picker Studio", font_size=18).pack(pady=10)
self.color_picker = BTkColorPicker(frame, width=400, height=300)
self.color_picker.pack(pady=20)
self.color_label = BTkLabel(frame, text="Selected: #FF6B35", font_size=14)
self.color_label.pack(pady=10)
self.color_picker.bind_color_change(self.on_color_change)
def on_color_change(self, color):
self.color_label.configure(text=f"Selected: {color}")
ColorApp().mainloop()
๐ Dashboard Example
from bettertkinter import BTk, BTkFrame, BTkLabel, BTkProgressBar, BTkNavBar
class Dashboard(BTk):
def __init__(self):
super().__init__(title="Analytics Dashboard", geometry="800x600", theme="dark")
# Navigation
nav = BTkNavBar(self, items=["Overview", "Analytics", "Settings"])
nav.pack(fill="x", padx=10, pady=10)
# Content frame
content = BTkFrame(self)
content.pack(fill="both", expand=True, padx=20, pady=20)
# Metrics
BTkLabel(content, text="๐ Key Metrics", font_size=16).pack(pady=10)
metrics_frame = BTkFrame(content)
metrics_frame.pack(fill="x", pady=10)
# Progress indicators
for metric, value in [("Revenue", 85), ("Users", 92), ("Growth", 78)]:
metric_frame = BTkFrame(metrics_frame)
metric_frame.pack(side="left", fill="both", expand=True, padx=5)
BTkLabel(metric_frame, text=metric).pack(pady=5)
progress = BTkProgressBar(metric_frame)
progress.set_value(value)
progress.pack(fill="x", padx=10, pady=5)
BTkLabel(metric_frame, text=f"{value}%").pack()
Dashboard().mainloop()
BetterTkinter provides a comprehensive set of modern widgets:
๐ช BTk Main Window |
๐ณ BTkButton Modern Buttons |
๐ผ๏ธ BTkFrame Containers |
๐ท๏ธ BTkLabel Text Display |
๐ BTkEntry Input Fields |
๐ฌ BTkDialog Message Boxes |
๐จ BTkColorPicker Color Selection |
โ๏ธ BTkCheckBox Checkboxes |
๐ BTkProgressBar Progress Indicators |
๐งญ BTkNavBar Navigation |
๐๏ธ BTkSlider Range Input |
๐๏ธ BTkCanvas Drawing Surface |
๐ Full Component Reference: Component Documentation
๐ velyzo.github.io/BetterTkinterDocs
Our comprehensive documentation includes:
- ๐ Getting Started Guide - Step-by-step tutorials
- ๐งฉ Component Reference - Detailed API documentation
- ๐ก Examples Collection - Real-world code samples
- ๐จ Theming Guide - Customization and styling
- ๐ Deployment Guide - Packaging and distribution
docs/
- Complete local documentationdocs/guides/
- Installation, quick start, deploymentdocs/components/
- Individual component docsdocs/examples/
- Code examples and tutorialsdocs/api/
- Full API reference
We welcome contributions! Here's how you can help:
- ๐ Report bugs and request features
- ๐ Improve documentation and examples
- ๐ง Submit pull requests with enhancements
- ๐ฌ Help others in discussions
- โญ Star the repository to show your support
See our Contributing Guide for detailed guidelines.
BetterTkinter powers a variety of applications:
- ๐ฅ๏ธ Desktop Applications - Business tools, utilities, games
- ๐ง Development Tools - IDEs, file managers, system monitors
- ๐จ Creative Software - Image editors, drawing apps, design tools
- ๐ Data Applications - Dashboards, analytics, visualization tools
๐ธ Share Your Creation: Built something amazing? Share it with us!
BetterTkinter is released under the MIT License. See LICENSE
for details.
MIT License - Feel free to use BetterTkinter in personal and commercial projects!
๐ Read the Docs โข ๐ฎ Try the Demo โข โญ Star the Repo
Made with โค๏ธ by the BetterTkinter Team