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

>> python -m ttkbootstrap

Basic Usage

from ttkbootstrap import Style, ttk

style = Style()
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.15.tar.gz (19.2 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.15-py3-none-any.whl (25.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ttkbootstrap-0.0.15.tar.gz
  • Upload date:
  • Size: 19.2 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.15.tar.gz
Algorithm Hash digest
SHA256 9fedd767df268d9044cb8be52727efd0e67bc772eee7825e15a022c18234c712
MD5 64d5bbc1ec2341172444b32369bf8e8d
BLAKE2b-256 76ee750988e6b2226642474d6e6f36a5602c724655bd9a9e170bafa2b2c28955

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ttkbootstrap-0.0.15-py3-none-any.whl
  • Upload date:
  • Size: 25.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.15-py3-none-any.whl
Algorithm Hash digest
SHA256 e80dc91d57119b98e572b697ad30f869feb9fe34db1c6f3ea216b4ee7948497a
MD5 94bc72426787b7da2dc518ad8798081b
BLAKE2b-256 213e64597bab5771d24458070689527856471d47dba5240304e64c285a3f1158

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