Expand description
ui — SwiftUI-flavored components for gpui. Reached as bezel::ui.
Style flows through the environment, never through parameters: components
read theme::Theme (a gpui Global) at paint time, the way
SwiftUI views read @Environment. Motion comes from the named
motion catalog.
Modules§
- combobox
Combobox— a select you can type into: the closed face of a select over an anchored menu whose rows narrow as you search.- control_
bar control_bar— the floating control bar: a glass surface holding a leading cluster, an optional centre, and a trailing cluster. Apple Music’s transport, a desktop agent app’s composer, a floating toolbar.- date
Calendar— a date picker: the closed face of a select over an anchored month grid.- floating
panel— content that floats over a page and is dragged around it: a meter, an inspector, a detached preview.- focus
- Keyboard focus traversal —
tabandshift-tabbetween controls. - hover_
card HoverCard— the richer sibling ofcrate::tooltip::Tooltip: a card that opens on hover and can itself be hovered, for a preview the pointer can travel into (a profile, a link target, a definition).- icons
- Embedded icon assets + the gpui
AssetSourcethat serves them. - input
TextField— a single-line text field with IME, selection and clipboard.- list
- Virtualized list — a thin binding over gpui’s
uniform_list, and a bridge that letscrate::scroll::scrollbarreport on one. - loaders
- Loaders: the orb cluster, the pulse loader and the gradient matrix spinners.
All motion routes through
motionpure helpers, so the math is unit-tested and these elements are testable-by-compile. - menu
Item— a row in a dropped menu — andcard, the panel that paints a list of them.- menubar
Menubar— the in-window bar: a strip of titles that drop menus.- pagination
- Pagination — for data that arrives in pages, not for lists that are long.
- palette
CommandPalette— a filtered command list over aTextField.- popover
- Popover / menu primitives: an anchored floating layer with the
menu-inanimation, outside-click dismissal, and pure keyboard-navigation + search reducers shared by every picker and menu (feature-inventory §1.12 popovers). - scroll
- A styled scrollbar over gpui’s own scroll handles.
- stack
- The two stacks, at the system gap.
- stats
Stats— the meter: how many frames this window is drawing, and what the process, the GPU and memory cost, while you watch it.- surface
crate::surface— the backdrop surface a floating card sits on: wraps a popover/dialog card so its ENTIRE subtree paints inside one scene layer (a single draw order).- table
- Table — for rows that are tuples.
- titlebar
titlebar— the strip a window with no system titlebar moves itself by.- tooltip
Tooltip— the small hover label.- tree
- Tree view — nested rows with disclosure, indent guides and arrow keys.
- widgets
- Widgets, grouped as catalog traits on
Theme— import the group, reach the component:use ui::widgets::{Content, Controls, Layout, Scaffolding, Status};→theme.group_box(),theme.tab(..).
Functions§
- register_
fonts - Register the bundled fonts with the gpui text system. Failure is non-fatal: the theme’s system fallbacks take over (same families the CSS stack names).