otter-ui supplies native Surface Description layout, input, controls, and reusable bar widgets. Import otter_ui.ui_frame; its frame facade exports Node, Id, UiState, specs, and dispatch types.
A node tree and UiFrame(caps) are frame-scoped borrowed values. Keep long-lived state in UiState(caps) and your app model. Images use ImageHandle values resolved through the frame’s image store.
There is no @import("otter_ui") root API. Import other packages directly when you need geometry, render resources, themes, or Wayland types.
Optional integrations
otter_ui_lua provides otter.ui, otter.ui.style, otter.ui.draw, and otter.ui.widgets; it does not make the whole native object model callable from Lua. The host-side SdSink(caps) replays Lua SD frames into native UI commands.
otter_ui_volume connects the volume widget to otter_desktop_pipewire. Ordinary otter_ui users do not have to link PipeWire or LuaJIT.
Reference pages
- Surface Description lifecycle
- Layout model
- Nodes and controls
- Input and overlays
- Drawing primitives
- Bar widgets
Source reference
otr/otr.toml, otr/ in the component repository.
