libui-python¶
Native GUI toolkit for Python. Lightweight bindings for libui-ng — real native widgets on Linux (GTK+3), macOS (Cocoa), and Windows (Win32).
No Electron. No web views. Just native controls.
Features¶
30+ native widgets — buttons, entries, sliders, tables, color pickers, drawing surfaces, and more
Declarative API — reactive state, composable components, two-way data binding
Async-first — built-in asyncio integration with thread-safe UI updates
Cross-platform — one codebase, native look and feel everywhere
Quick example¶
import libui
from libui.declarative import App, Window, VBox, Label, Button, State
async def main():
app = App()
count = State(0)
app.build(window=Window(
"Hello", 400, 300,
child=VBox(
Label(text=count.map(lambda n: f"Count: {n}")),
Button("Click me", on_clicked=lambda: count.update(lambda n: n + 1)),
),
))
app.show()
await app.wait()
libui.run(main())
Screenshots¶
Native look and feel on every platform — the same code, rendered with real OS widgets:
macOS
Cocoa
Linux
GTK+3
Windows
Win32
Getting Started
Tutorial