An extension library for CustomTkinter providing advanced UI widgets missing in the native framework, designed for compact engineering tools, dashboards, and modern desktop apps.
- Vertical & Horizontal Support: Dynamic orientation control via
orientation="vertical"ororientation="horizontal". - Border-Free & Compact: Clean design optimized for toolbar panels where horizontal space is critical.
- Smart Alignment: Automatically repositions text labels (top/bottom/left/right) while keeping full theme and scaling compatibility.
- Rich Dropdown Lists: Associate custom PIL/CTkImages with each item in your option menu list.
- Improved Window Management: Floating dropdown automatically manages loss-of-focus and cleans up properly upon parent window movement or resizing.
- Smooth Scroll: Handles large option lists cleanly with embedded scrolling support.
import customtkinter as ctk
from PIL import Image
from customtkinter_ext import CTkOptionMenu, SwitchConBorde
app = ctk.CTk()
app.geometry("400x250")
# 1. OptionMenu with Images
icon = ctk.CTkImage(Image.open("icons/core.png"), size=(30, 30))
image_map = {"Option 1": icon, "Option 2": icon}
menu = CTkOptionMenu(
app,
values=list(image_map.keys()),
image_map=image_map,
image_size=(30, 30),
width=200
)
menu.pack(side="left", padx=20, pady=20)
# 2. Vertical Switch
v_switch = SwitchConBorde(
app,
orientation="vertical",
text="ALIGN"
)
v_switch.pack(side="right", padx=20, pady=20)
app.mainloop()