Skip to main content

A supercharged theme extension for tkinter that enables on-demand modern flat style themes inspired by Bootstrap.

Project description

Downloads Downloads

ttkbootstrap

Modern, themed tkinter — style any ttk widget with one keyword.

ttkbootstrap is a theming extension for tkinter. It generates flat, Bootstrap-inspired light and dark themes on demand and adds a single bootstyle keyword to every ttk widget, so you describe intent"primary", "success", "outline" — instead of hand-tuning colors or long ttk style names.

A ttkbootstrap window: color swatches above themed buttons, inputs, a meter, a table, and a notebook

Why ttkbootstrap

  • 🎨 30 curated themes — fifteen families, each in a coordinated light and dark variant, that switch at runtime.
  • ⌨️ One-keyword stylingbootstyle="success", bootstyle="info outline", bootstyle="round toggle". The same keyword means the same thing on every widget.
  • 🧩 Batteries-included — styled ttk widgets plus a few extras (Meter, DateEntry, Floodgauge, Tableview) and fully themed dialogs.
  • 🛠️ Your own themes & styles — a declarative Theme(...) API and a public toolkit for building custom widget styles.
  • 🪶 Pure Python — one dependency (Pillow), Python 3.10+, no native extensions.

It's a styling layer for vanilla tkinter, not a new framework: the widgets stay tkinter's, and everything you already know about tkinter still applies.

Install

python -m pip install ttkbootstrap

Quickstart

import ttkbootstrap as ttk

app = ttk.App(title="Hello")

ttk.Label(app, text="Hello from ttkbootstrap!").pack(padx=16, pady=(16, 8))
ttk.Button(app, text="Primary", bootstyle="primary").pack(padx=16, pady=4)
ttk.Button(app, text="Success", bootstyle="success").pack(padx=16, pady=4)
ttk.Button(app, text="Danger Outline", bootstyle="danger outline").pack(padx=16, pady=(4, 16))

app.mainloop()
The Hello window: a greeting label above primary, success, and danger-outline buttons

The bootstyle keyword

A bootstyle value is a small grammar — a color, plus an optional modifier and widget type — and the same keyword carries the same meaning across widgets:

ttk.Button(app, bootstyle="success")
ttk.Progressbar(app, bootstyle="success")
ttk.Entry(app, bootstyle="success")

Add a modifier or a type for variants: "info outline", "success round toggle", "warning striped". The vocabulary is closed, so a typo fails loudly instead of silently doing nothing. See the bootstyle grammar for the full reference.

Themes

Thirty curated light and dark themes, switchable at runtime:

app.theme_use("bootstrap-dark")   # any theme by name
app.toggle_theme()                # flip light <-> dark

Browse them in the themes gallery.

Documentation

Upgrading from 1.x

2.0 is a cleanup-and-consolidation release with some breaking changes — a canonical bootstyle grammar, a new theme catalog, and App alongside Window. Most code keeps working: legacy theme names and older spellings are accepted with a deprecation warning. The Migrating to 2.0 guide sorts every change into breaking / deprecated / notable / new.

Icons

ttkbootstrap ships with the full Bootstrap Icons set (2,000+ glyphs), rendered from a bundled font — theme-following, crisp at any size, and no extra dependency. Add one with the icon= keyword:

ttk.Button(app, text="Settings", icon="gear-fill", bootstyle="primary")

Need other icon families — Font Awesome, Material, Lucide, and more? The ttkbootstrap-icons extension is still available and adds installable icon providers alongside the built-in set.

Contributing

Contributions are welcome — please check out our contributing guidelines.

Support

This project is proudly developed with the support of the PyCharm IDE, generously provided by JetBrains.

JetBrains logo

© 2025 JetBrains s.r.o. JetBrains and the JetBrains logo are registered trademarks of JetBrains s.r.o.

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

ttkbootstrap-2.0.0.tar.gz (525.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ttkbootstrap-2.0.0-py3-none-any.whl (510.3 kB view details)

Uploaded Python 3

File details

Details for the file ttkbootstrap-2.0.0.tar.gz.

File metadata

  • Download URL: ttkbootstrap-2.0.0.tar.gz
  • Upload date:
  • Size: 525.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for ttkbootstrap-2.0.0.tar.gz
Algorithm Hash digest
SHA256 a8ad65ceb6aac804a01001743e9ee08f1503dea4d46e5bd75c018bcd42528d3d
MD5 068adf4d78480946f3bb16b7655128ab
BLAKE2b-256 628198dd990d19ee1a0ff7c3734cc263d102c6b9ae5ae7bad88b9db194c0e8ea

See more details on using hashes here.

File details

Details for the file ttkbootstrap-2.0.0-py3-none-any.whl.

File metadata

  • Download URL: ttkbootstrap-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 510.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for ttkbootstrap-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ee679c23b931160fcb1a2cb154d81bd372d34c1d349a8ae86e8d62ed9c6ac5cc
MD5 cba32b1b8e359ffc3b14f6b9f0737542
BLAKE2b-256 99084d4cb916f449c8375b3d9946482104d48ca58cb2c35c82605be8f6fc18a9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page