Skip to main content
Yanked

This release has been yanked by its maintainers, and will be ignored by installers, except when explicitly specified.
Consider using release 2.2.7 instead.
Reason given by maintainers: development version

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

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()

Or, create and run this python script

from ttkbootstrap import Demo
if __name__ == '__main__':
    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.

Create New Themes

Creating a new theme is easy... simply add a theme record to the themes.json file with the appropriate fields

    {
      "name": "cosmo",
      "font": "Helvetica",
      "type": "light",
      "colors": {
        "primary": "#2780e3",
        "secondary": "#373a3c",
        "success": "#3fb618",
        "info": "#9954bb",
        "warning": "#ff7518",
        "danger": "#ff0039",
        "bg": "#ffffff",
        "fg": "#373a3c",
        "selectbg": "#373a3c",
        "selectfg": "#ffffff",
        "light": "#fdfdfe",
        "border": "#ced4da",
        "inputfg": "#49506a"
      }
    }

Light Themes





Dark Themes

Metadata

Release files for ttkbootstrap 0.0.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ttkbootstrap 0.0.6
File Size Uploaded Provenance Actions
ttkbootstrap-0.0.6.tar.gz 14.3 kB Without provenance Details for ttkbootstrap-0.0.6.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ttkbootstrap 0.0.6
File Interpreter ABI Platform Actions
ttkbootstrap-0.0.6-py3-none-any.whl Python 3 none any Details for ttkbootstrap-0.0.6-py3-none-any.whl

Total release size: 29.5 kB

Release files / ttkbootstrap-0.0.6.tar.gz

Download URL ttkbootstrap-0.0.6.tar.gz
Size 14.3 kB
Tags Source
SHA-256 checksum
How to use checksums
dddac0e8cfd57afa3f2c7d809e84c37b1c80d516a8ea33c4592aa0632511421c
BLAKE2b-256 checksum
How to use checksums
7e43e5d14466fc24a930d30e2cf07b13fc16a7498475b3e561ea0ffc43752625
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / ttkbootstrap-0.0.6-py3-none-any.whl

Download URL ttkbootstrap-0.0.6-py3-none-any.whl
Size 15.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3a8e4c1807491f5b147a8c9bd8a44e80a3428499b73bee228bad0c35c327a9c2
BLAKE2b-256 checksum
How to use checksums
28f3814c92bfe3f34a143ac69e3994a06ad29fda2e056ca5104787d9f3cc3244
Upload date
Uploaded using Trusted Publishing?
What is 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

Security for ttkbootstrap 0.0.6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.6 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page