Component coverage and Python API¶
The goal remains full GPUI Kit access from Python. The library exposes
80 controls, reusable command/menu models and native notifications through
Application.notify. Layout helpers use GPUI directly; the themed component
wrappers construct actual Kit components. There are no placeholder classes for
unimplemented Kit families.
This is basic catalog coverage, not parity with every upstream builder method. The inventory below is grounded in the pinned component crate. Component links resolve to that same immutable revision. Examples are entirely Python: workspace and gallery.
Release and upstream baseline¶
gpyui 0.7.0 targets Kit 0.11.0 / GPUI 0.3.14 at
e97fe438.
Version 0.7.0 adds GridLayout, GridItem and Diff. Version 0.8.0 adds
application-wide layout direction.
The earlier entries in the coverage table link to their original 0.6.1 source baseline.
Version 0.6.1 includes Image, expanded window controls, exact macOS Classic themes, keyed tables, richer inputs, MultiSelect and CommandPalette. These additions require version 0.6.1 or later. Verify the installed version before using those APIs. The catalog counts Python controls. Rust and Python group their component families differently.
Version 0.6.1 pins GPUI Kit 0.7.1 / GPUI 0.3.8 at
c1bda59e67f46266991a230ae94f749af496af2a.
The matching HTTP client also uses snapshot 0.3.8. The released 0.5.0 backend
used Kit 0.7.0 / GPUI 0.3.7; verify the installed package when comparing runtime
behavior. Updating the dependency does not expose additional Python controls.
Available controls¶
Controls accept a positional value for their first property and keyword
arguments for the others. Container controls accept children=[...] and with
blocks. Row, Container and Scroll also accept a positional children list.
Column retains its original children-list constructor.
| Family | Python controls | Initial contract |
|---|---|---|
| GPUI layout | Column, Row, Container, Scroll |
Children, pixel layout, native vertical scrolling |
| GroupBox | GroupBox |
Title and children |
| Toolbar, StatusBar | Toolbar, StatusBar |
Python-composed native content |
| Label, Button | Label, Button |
Text; button disabled/click, constructor variant/icon |
| Command | CommandPalette |
Retained query/search/keyboard navigation; shared Commands, live enabled/checked and shortcut hints |
| Input | TextInput, TextArea, NumberInput, OtpInput, Editor |
Native editing, value/change, explicit two-way binding; disabled/read-only editing; TextInput masking, clear/adornments and submit/focus/blur; numeric bounds/step |
| Form/Field | Form, Field |
Real Kit grid/labels/help/required markers; Python sync/async validation, inline errors and shared async submission; retained conditional editors |
| Checkbox, Switch, Radio, Toggle | Checkbox, Switch, Radio, Toggle, RadioGroup |
Boolean or index value, disabled, change/binding; standalone radios need Python grouping policy |
| Slider, Rating | Slider, Rating |
Scalar slider range/step, 0–5 rating, change/binding; slider release event |
| Select, Combobox | Select, Combobox, MultiSelect |
Mutable string items, single or multiple selected values, disabled; native searchable combobox |
| Tabs, Sidebar, Breadcrumb, Stepper | Tabs, Sidebar, Breadcrumb, Stepper |
Labels, zero-based selection, disabled, change |
| Pagination, Link | Pagination, Link |
Zero-based page value translated to Kit's one-based page API; URL/click |
| List, Table, Tree | List, Table, Tree |
ListItem composition; retained TableState/delegate and rows; retained TreeState with stable item IDs |
| Charts | LineChart, AreaChart, BarChart, PieChart, CandlestickChart |
Native plots and tooltips, assignable data; line domain follows data |
| Calendar, DatePicker, TimeField, ColorPicker | Calendar, DatePicker, TimeField, ColorPicker |
Native state and change/binding; single ISO dates, local time to seconds, hex RGB/RGBA colors |
| Progress, Spinner, Skeleton, Shimmer | Progress, ProgressCircle, Spinner, Skeleton, Shimmer |
Percentage/indeterminate progress and native animated feedback |
| Tag, Badge, Avatar, icons | Tag, Badge, Avatar, Icon, Kbd, Separator |
Semantic tag variants, count badges, initials, bundled Lucide icons, keystrokes, separators |
| Alert, Empty, DescriptionList | Alert, Empty, DescriptionList |
Text/variants and label/value pairs |
| Accordion, Collapsible, Carousel, Resizable | Accordion, Collapsible, Carousel, Resizable |
Disclosure, native slide selection, native resize state and resize events |
| Grid layout | GridLayout, GridItem |
Native move/resize and keyboard interaction, stable keys, JSON-compatible layout snapshots and restoration |
| Diff | Diff |
Native virtualized patch/source viewer, split and unified presentation, folding options and selection events |
| Dialog, Sheet, Notification | Dialog, Sheet, app.notify(...) |
Python contents, queued native open/close, native dismissal mirrored to value; one dialog and one sheet per window |
| Tooltip, Popover, HoverCard, Clipboard | Tooltip, Popover, HoverCard, Clipboard |
Native hover/popup/copy behavior and Python-composed popup contents |
| Message, Bubble, Marker, Attachment, Text | Message, Bubble, Marker, Attachment, Markdown, Html |
Native content presentation and rich text selection |
Commands and menu coverage (0.3.0)¶
Command, Menu and MenuSeparator are application-owned models in addition to
80 layout controls. DropdownMenu, Control.context_menu(...) and application
menus use Kit's real menu builders. Commands provide shared enabled/checked
state, async callbacks and platform-aware shortcuts. macOS uses system application
menus, Windows/Linux use Kit AppMenuBar; OS-native context menus fall back to
Kit on Linux. See commands and menus.
Values, updates and constraints¶
on_change(event) receives Event.value after native state has changed and the
Python mirror/bound State has been updated. Zero-argument and async callbacks
retain the original contract. Kit controlled controls write their state in Rust
and notify immediately; their interaction does not wait for Python to redraw.
Entity-backed inputs retain focus, caret, editing buffers and undo history in Rust.
All input values are strings, including NumberInput's partially edited buffer.
NumberInput has mutable optional bounds and positive step, clamped natively on stepping/blur. Boolean controls use bool; navigation, rating,
pagination and table selections use zero-based indices; Tree uses stable string
item IDs. Select/Combobox use selected strings, with "" for no selection; MultiSelect uses lists of selected strings. Date
controls use YYYY-MM-DD or ""; time uses HH:MM:SS; colors use #rrggbb or
#rrggbbaa. Tables select source row zero initially; keyed row replacement retains selected_key. Empty tables retain value zero and selected_key None. Filtering can hide the selected row without clearing domain selection. List currently composes Kit ListItems;
the full virtual ListState/delegate API is not exposed.
Table rows are lists of strings or TableRow(key, cells) models matching its columns. TableColumn supports individual width and text/numeric sorting; native sorting/filtering leaves source order intact. See tables and inputs. Charts accept
[[label, value], ...]; candles accept [label, open, high, low, close] and
validate the OHLC bounds. Tree items have id, text, and optional children;
IDs must be unique, with a maximum of 10,000 items and 32 levels.
Properties are mutable through assignment unless explicitly fixed: Slider range/step; Tree items; Table columns/column_width/per-column configuration; OTP length; Resizable axis; Dialog/Sheet title. Collections are copied when assigned/read. Dynamic roots and container children, visibility and explicit subtree disposal are supported. Reordering, moving, hiding and detaching preserve native control identity and editing state. Accordion initially exposes one open index and string item contents. Avatar initially exposes initials; Editor exposes editing without Python LSP/provider hooks. Chart animation/hover and resize geometry remain native. Native presets and custom themes can be applied at startup or switched at runtime.
.style(...) supports width, height, min_width, min_height, padding, gap, radius,
font_size, flex, full_width, full_height, border, bold, align and justify. Spacing
and dimensions are pixels. Background/color use semantic theme tokens:
background, foreground, muted, muted_foreground, primary, primary_foreground,
secondary, secondary_foreground, border, accent, accent_foreground, danger,
success, warning, info and transparent.
Theme coverage (0.4.0)¶
Theme is an immutable application model, separate from the 80 controls. Native macOS/Windows and shadcn Zinc/Blue presets support light/dark modes, semantic color overrides, radii, fonts and shadows. Runtime switching preserves native editors; awaited theme snapshots verify Kit and Base values. Custom title bars and window materials remain outside the binding. Refinements in 0.5.0 add platform sizing/treatment for Button, DropdownMenu, TextInput, TextArea, Select, Checkbox and Switch, plus slider thumb/track tokens. Other controls share the palette/radius; there is no claim of full AppKit/WinUI parity. See themes and previews.
Remaining catalog work¶
These are real gaps, not aliases to generic containers:
| Upstream area | Next implementation |
|---|---|
command |
Groups/keywords/custom rows, user-editable keymaps and sequential chords; native CommandPalette, reusable commands, menus and window shortcuts are implemented |
dock |
Stable panel identities, persistence, drag/detach behavior and multiwindow lifecycle |
setting, questionnaire |
Schema-driven settings/questionnaires; Form/Field, validation, conditional fields and submission lifecycle are implemented |
list, searchable_list, virtual list |
Native ListState/delegate, stable item keys, sections/custom rows, queued async search, load-more and scroll-to-item; current List renders every item |
table |
Custom cells/editors, richer selection, async delegates and load-more; stable keys, per-column widths/text-numeric sorting, local filtering and native virtualization are implemented |
tree |
Dynamic/lazy children, metadata/custom rows and programmatic expansion/scrolling; stable IDs and native TreeState are implemented, but items are fixed |
select, combobox |
Typed item metadata, groups, disabled items, custom triggers/rows and managed async providers; mutable string choices and MultiSelect are implemented |
input |
InputGroup, element adornments, paste/token hooks, caret/selection methods and richer event metadata; TextInput disabled/read-only/password/clear/string adornments/submit/focus/blur and numeric bounds/step are implemented |
message_scroller |
Native anchoring/follow behavior, streaming updates and history loading |
chart, plot |
Radar/Sankey, multiple series and lower-level plot composition |
| Existing families | Button/Avatar groups, image avatars, richer navigation/accordion items, date ranges/disabled-date rules, range sliders, controlled Popover/HoverCard lifecycle and complete builder options; Dialog/Sheet already expose open/close |
input::editor, highlighter, history |
Language/LSP/completion providers, diagnostics, search/decorations and explicit undo/redo commands; editing/history already run natively |
| Scroll, layout and styles | Horizontal/bidirectional scrolling, scroll handles, full grid/wrap/per-edge/max-size styling and broader native layout options |
| Focus, accessibility and locale | General control focus/tab-order APIs, accessibility label/role overrides and Kit locale selection. Version 0.8.0 exposes application-wide layout direction |
| Notifications | Custom content/actions and fuller lifecycle/configuration; message/title/variant notifications are implemented |
diff |
Annotation and decoration models, conflict-resolution APIs and programmatic navigation |
grid_layout |
Responsive reflow and custom drag and resize handles |
speech |
Python state/models/events and native component wrappers |
Next: native List virtualization and stable item keys, richer selection metadata, custom table cells and async data providers. Docking and multiwindow follow. Keyed tables, everyday input/selection options and shared command search now have native acceptance coverage. Full Kit parity still requires the remaining behaviors and wider platform testing.
Kit 0.7.1 additions and binding limits¶
The upgraded dependency includes
Diff,
a native virtualized patch/source/conflict viewer, and
Speech,
experimental dictation state, button and waveform components. Default microphone
and system recognition support requires upstream's optional speech feature
and depends on the platform. The Python Diff binding supports patches and unchanged
source files. Speech bindings and the optional speech feature remain pending. The optional GPUI Fast backend is available
upstream but is not enabled by gpyui; the standard GPUI backend remains selected.
Upstream input/IME/completion/streamed-text fixes are included by the upgrade. Tooltip timing defaults, clipboard accessibility labels and input-token hover events also exist upstream; Python options/event hooks remain unbound.
The source review checks Python contracts, representative native implementations and upstream source/docs; it does not certify exhaustive builder or platform parity. See native validation for dependency-upgrade checks and existing acceptance evidence.
Images (0.6.1)¶
Image exposes Kit’s native img() for paths, HTTP(S) URLs, encoded bytes and
bundled assets, with native GIF/WebP animation, fit modes, sizing, grayscale,
loading/error text, queued callbacks and retry. Results are scoped to the current
source and released on replacement/disposal. Image avatars, custom placeholders,
shared caches and video streaming remain future work. See the Images guide.
Window controls (0.6.1)¶
Window creation now exposes fixed-size policy, configurable minimum content size, position/state and movement/minimize flags. Running apps can update title, request size/focus/minimize/maximize/fullscreen and read actual native bounds. These use GPUI WindowOptions through Kit’s window helper, not extra components. One window remains the limit. See window controls for the Linux fixed-size guard, desktop-dependent behavior and remaining window gaps.