Skip to main content

A collection of modern ttk themes inspired by Bootstrap

Reason this release was yanked:

development version

Project description

ttkbootstrap

A collection of modern themes for Tkinter TTK built using standard, cross-platform themes ('clam', 'alt', 'classic', 'default'). Most of these themes are adapted and or/inspired from the open source bootstrap themes published on https://bootswatch.com/

Installation

https://pypi.org/project/ttkbootstrap/

pip install ttkbootstrap

Demonstration

You check out the examples below in a live demonstration by executing the following code in the python interpreter

>> from ttkbootstrap import Demo
>> Demo()

Basic Usage

from ttkbootstrap import BootStyle, ttk

style = BootStyle()
style.theme_use('flatly')
root = style.master

# create widget with primary colors
ttk.Label(root, text='Hello world').pack()

# create widget with other colors
ttk.Label(root, text='Hello world', style='danger.TLabel').pack()

# run the window
root.mainloop()

Applying Styles

By default, the primary color for the theme will be used on widgets (See images below for examples of theme color options). All other themed colors can be used by applying the color prefix to the ttk widget class.

ttk.Label(root, text='Hello World', style='info.TLabel')
ttk.Button(root, text='Hello World', style='info.TButton')
ttk.Button(root, text='Hello World', style='warning.Outline.TButton')
ttk.Radiobutton(root, text='Hello World', style='danger.TRadiobutton')

Color prefixes

  • primary (default)
  • secondary
  • success
  • info
  • warning
  • danger

Defined ttk widget classes

  • TButton
  • Outline.TButton
  • TSpinbox
  • Horizontal.TScale
  • Vertical.TScale
  • Horizontal.TScrollbar
  • Vertical.TScrollbar
  • TCombobox
  • TFrame
  • TCheckbutton
  • TEntry
  • TLabel
  • TLabelframe
  • TNotebook
  • TMenubutton
  • Outline.TMenubutton
  • Horizontal.TProgressbar
  • Vertical.TProgressbar
  • TRadiobutton
  • Treeview

Exceptions

  • The Scale widget is built with an image set in the primary theme color; this cannot be changed via styles.
  • The Checkbutton and Radiobutton colors are only changeable on Linux and MacOS. Windows uses the built-in "xpnative" themed elements to build the widgets.

Light Themes





Dark Themes

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-0.0.8.tar.gz (13.8 kB view details)

Uploaded Source

Built Distribution

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

ttkbootstrap-0.0.8-py3-none-any.whl (14.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ttkbootstrap-0.0.8.tar.gz
  • Upload date:
  • Size: 13.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.8

File hashes

Hashes for ttkbootstrap-0.0.8.tar.gz
Algorithm Hash digest
SHA256 3f0eba543496d51ece5c7373a1929729a7aadca946186b20898dfc6c9fcc824a
MD5 35e38a02ca1d5c8e4ca200efd30e0c11
BLAKE2b-256 6599022f9a6aae4b229f03d4c496f61edf89f4fc1ec31576437e4b6e43630a2f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ttkbootstrap-0.0.8-py3-none-any.whl
  • Upload date:
  • Size: 14.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.8

File hashes

Hashes for ttkbootstrap-0.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 5cce3b604e4ee4c77df6cdf0699f9a4c48f4f46243adeb4abf3cc7346f725fee
MD5 5f4a924e11203f31509d24204e01876b
BLAKE2b-256 7567e3f5c684d4d629f2e058bec3c39667e472800b083d23d839955277ffe14e

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