ttk

ttkbootstrap

A collection of modern themes for Tkinter TTK

Showing:

Readme

ttkbootstrap

A collection of modern flat themes inspired by Bootstrap.

How to install (0.5 - stable)

pip install ttkbootstrap

Examples

light theme example (1.0 - alpha)

dark theme example (1.0 - alpha)

Versions

0.5 - stable

import tkinter as tk
from tkinter import ttk
from ttkbootstrap import Style

root = tk.Tk()
style = Style()

b1 = ttk.Button(root, text="Submit", style='success.TButton')
b1.pack(side=tk.LEFT, padx=5, pady=10)

b2 = ttk.Button(root, text="Submit", style='info.Outline.TButton')
b2.pack(side=tk.LEFT, padx=5, pady=10)

root.mainloop()

1.0 - alpha

  • Adds the new bootstyle parameter to set styles (legacy ttk style is also useable)
  • Adds new themed styles for Labelframe, Scrollbar,
  • Saves memory by only building ttk styles that are used
import tkinter as tk
import ttkbootstrap as ttk

root = tk.Tk()
style = ttk.Style()

b1 = ttk.Button(root, text="Submit", bootstyle='success')
b1.pack(side=tk.LEFT, padx=5, pady=10)

b2 = ttk.Button(root, text="Submit", bootstyle='info-outline')
b2.pack(side=tk.LEFT, padx=5, pady=10)

root.mainloop()

The new keyword api is very flexible. The following examples all produce the same result:

  • bootstyle="info-outline"
  • bootstyle="info outline"
  • bootstyle=("info", "outline")