pane
Python bindings for Pane — a modern, minimalist Windows UI engine built on WPF. Build real native Windows app UIs from Python: buttons, checkboxes, sliders, text input, tabs, live light/dark theming and accent-color switching, all with a single custom-chrome window.
The engine itself is C#/WPF; this package drives it in-process via pythonnet, so widgets are the real native controls, not a re-implementation.
Windows only (WPF has no cross-platform equivalent). Requires the free .NET 8 Desktop Runtime — not the SDK, just the runtime.
Install
pip install pane-ui
Quick start
import pane
def build(window):
window.Content = pane.stack(
pane.text("Hello from Python", size="title", bold=True),
pane.button("Click me", style="primary", on_click=lambda: print("clicked!")),
pane.checkbox("Enable notifications", checked=True),
spacing=12,
margin=24,
)
pane.run(build, title="My App")
Run the full widget gallery from the source repo for a tour of everything
available: python examples/gallery.py.
Widgets
button, checkbox, radio_button, toggle_switch, text_box,
password_box, progress_bar, slider, combo_box, list_box, nav_list,
tab_control, expander, group_box, separator, text, color_swatch,
menu_bar, chat_panel, plus set_tooltip / set_context_menu helpers.
combo_box, list_box and nav_list pass the selected item itself to
on_change/on_select (not its index) - read .SelectedIndex off the
returned control if you need that instead:
pane.combo_box(["Newest first", "Oldest first"], on_change=lambda choice: print(choice))
set_context_menu and menu_bar share the same items format: a list of
(label, on_click) pairs, (label, sub_items) pairs for a nested submenu, or
None for a separator:
pane.menu_bar([
("File", [("New", on_new), ("Open", on_open), None, ("Exit", on_exit)]),
("Edit", [("Cut", on_cut), ("Copy", on_copy), ("Paste", on_paste)]),
])
Chat
chat_panel() is a scrollable, bubble-styled message list with an input
row - it's just the UI, with no idea what "AI" means:
chat = pane.chat_panel(
on_send=lambda text: f"you said: {text}", # return a string for a quick
# synchronous reply, or None
# and call chat.add_message()
# yourself later (e.g. from a
# background thread via
# pane.invoke(), for an LLM
# call that takes real time)
placeholder="Message...",
welcome="Hi! What can I help with?",
)
window.Content = pane.stack(chat.control, margin=16)
See examples/chat_app.py for a runnable template - the widget, the input
handling, and the recommended async-reply pattern (a background thread +
pane.invoke(), so a slow call never freezes the window), with a single
placeholder function (get_reply()) marking where you'd wire in a real
backend of your choice.
Layout
stack(*children, orientation=, spacing=, margin=),
grid(children, rows=, columns=), card(*children), sidebar(*children),
scroll(child).
Theming
pane.set_theme("light") # or "dark"
pane.toggle_theme()
pane.set_accent("#4C82F7") # hex string or (r, g, b) tuple
pane.reset_accent()
Every widget re-themes live, mid-run, no restart needed.
Events
Callbacks adapt to whatever you write - zero args or one:
pane.button("Save", on_click=lambda: print("saved"))
pane.slider(on_change=lambda value: print(value))
Threading
pane.run(builder) builds the window on a dedicated UI thread and blocks
until it's closed. Build your widget tree inside builder. To update the UI
later from another thread (a timer, a background task), use
pane.invoke(fn) to marshal back onto the UI thread.
License
MIT
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pane_ui-0.1.6.tar.gz.
File metadata
- Download URL: pane_ui-0.1.6.tar.gz
- Upload date:
- Size: 33.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ba140b2d272a20c01b3320efadde36c87d6555c9a65f7600fff582c6717d5463
|
|
| MD5 |
c2dcee75943214bb62a2c7a725de86bb
|
|
| BLAKE2b-256 |
96d79e48664b1c58d3f2b440850a2ee04e436b45b1433336daf6825063724e1b
|
Provenance
The following attestation bundles were made for pane_ui-0.1.6.tar.gz:
Publisher:
publish.yml on HunterGHall/pane
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pane_ui-0.1.6.tar.gz -
Subject digest:
ba140b2d272a20c01b3320efadde36c87d6555c9a65f7600fff582c6717d5463 - Sigstore transparency entry: 2713053786
- Sigstore integration time:
-
Permalink:
HunterGHall/pane@9a9d0ea2529f9048f02a2cea682b678103e4638c -
Branch / Tag:
refs/tags/v0.1.6 - Owner: https://github.com/HunterGHall
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@9a9d0ea2529f9048f02a2cea682b678103e4638c -
Trigger Event:
release
-
Statement type:
File details
Details for the file pane_ui-0.1.6-py3-none-any.whl.
File metadata
- Download URL: pane_ui-0.1.6-py3-none-any.whl
- Upload date:
- Size: 33.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e3dbd639de54fb3bd3c83f997c78a8b6a18c1683509d94b0ed2beb7eb9139efe
|
|
| MD5 |
c10f4025fe6675f61aab51ddf44dc3df
|
|
| BLAKE2b-256 |
63fce19d8bec6c08532500d3d17d5a3ab021ec3c20a18875eed7e9b6d8d2dd67
|
Provenance
The following attestation bundles were made for pane_ui-0.1.6-py3-none-any.whl:
Publisher:
publish.yml on HunterGHall/pane
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pane_ui-0.1.6-py3-none-any.whl -
Subject digest:
e3dbd639de54fb3bd3c83f997c78a8b6a18c1683509d94b0ed2beb7eb9139efe - Sigstore transparency entry: 2713053953
- Sigstore integration time:
-
Permalink:
HunterGHall/pane@9a9d0ea2529f9048f02a2cea682b678103e4638c -
Branch / Tag:
refs/tags/v0.1.6 - Owner: https://github.com/HunterGHall
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@9a9d0ea2529f9048f02a2cea682b678103e4638c -
Trigger Event:
release
-
Statement type: