gitmyhub

CustomTkinter

Python ★ 13k updated 3mo ago

A modern and customizable python UI-library based on Tkinter

CustomTkinter is a Python library that replaces Tkinter's dated-looking default widgets with modern, dark-mode-aware controls that look current on Windows, macOS, and Linux without restructuring your existing code.

PythonTkintersetup: easycomplexity 2/5

CustomTkinter is a Python library for building desktop application windows with a modern visual style. It builds on top of Tkinter, which is the standard GUI toolkit bundled with Python, but replaces its dated-looking buttons, sliders, checkboxes, and other controls with redesigned versions that look current on Windows, macOS, and Linux.

The main thing CustomTkinter adds is automatic support for light and dark modes. If the operating system is set to dark mode, CustomTkinter windows and widgets switch their colors automatically. You can also force a specific mode in code. All widgets also support high-DPI scaling, which means they appear at the right size on monitors with high pixel density, such as Retina displays on Mac or 4K screens on Windows.

Because CustomTkinter uses the same programming model as standard Tkinter, existing code does not need to be restructured to use it. You swap the standard widget classes for CustomTkinter equivalents, and they behave the same way. You can also mix CustomTkinter widgets with regular Tkinter elements in the same window. The library ships with a few built-in color themes, including blue, dark-blue, and green, and supports custom themes.

The available widgets include buttons, labels, input fields, sliders, checkboxes, radio buttons, dropdown menus, progress bars, scrollable frames, tab views, and segmented buttons, among others. The README includes code examples showing a minimal working window, and the documentation website covers each widget's options in detail.

CustomTkinter is installed with a single pip command and is licensed under MIT, which allows free use in personal and commercial projects. The project is actively maintained and documents its API on an official website.

Where it fits