Skip to content

Tela

Tela is a desktop UI framework written in pure Go: no cgo, no webview, no native toolkits. You write components (structs with a Build method, or functions) with React-style hooks and style them with Tailwind v4 classes; Tela draws every pixel itself, on Linux (Wayland and X11) and Windows. The same tree also renders without a window, to a PNG and to a text tree, so both people and LLM agents can build and check interfaces without trial and error.

Hello, Tela: the headline example rendered by Tela

func Counter() tela.Node {
count, setCount := tela.UseState(0)
return Div(Class("flex flex-col items-center gap-6 p-10 rounded-3xl "+
"bg-linear-to-br from-indigo-500 to-fuchsia-600 shadow-2xl"),
H1(Class("text-5xl font-bold text-white tracking-tight"),
Textf("Count: %d", count)),
Button(Class("px-6 py-3 rounded-xl bg-white/15 text-white hover:bg-white/25 active:scale-95"),
OnClick(func(tela.MouseEvent) { setCount.Set(count + 1) }),
Text("Increment"),
),
)
}

Status: pre-1.0. The public API (tela, h, telatest) may still break between minor versions. macOS has no window backend yet (it only cross-compiles). See the project status.

Page What you learn
Getting Started Install, write a counter, run it, render it without a window
Styling Tailwind classes, typed style props, variants, dark mode
Theming Semantic colors (shadcn/ui names) that follow the color scheme, radius and fonts, Scheme for part of the window, UseTheme, class aliases
Hooks State, effects, intervals and goroutines, memoization, context, refs, observable values
Events Pointer, keyboard, focus, drag, long press, wheel
Elements and Props Everything package h exports and how elements compose
Forms and Text Input Input, Textarea, Form, Label, IME
Scrolling and VirtualList Scroll containers, scroll APIs, 100,000-row lists
Animation Transitions, starting:, springs and tweens, enter and exit with Presence, layout animations
Internationalization Message catalogs (ICU), plurals, locale-aware numbers, dates and lists, switching the language at run time
Icons h.Icon, the Lucide set, generating an icon set from SVG files with tela icons gen, what icons cost in a binary
Kit Ready-made components in the look of shadcn/ui: the shape of a component, controlled and uncontrolled values, trigger slots, customizing with theme tokens, recipes and classes, and every component with an example
Aria Behavior hooks: press, hover, focus, buttons, checkboxes and switches, and UseFloating for popovers, tooltips and menus
Windows and Desktop Several windows with tela.Window, UseWindow, custom title bars, file dialogs, message boxes, notifications, the tray, settings, remembered window placement, app folders, what each platform lacks
Accessibility Roles, ARIA props, aria snapshots
Testing telatest: mount, click, expect, goldens, without a window
CLI tela snapshot, tela inspect, tela icons gen, debug overlays, environment variables

Every symbol is documented on pkg.go.dev. The wiki also carries the same doc comments as generated pages, which in addition list the fields and methods of the event, state and element-handle types (pkg.go.dev shows only the aliases for those).

Package Import path pkg.go.dev Wiki
tela github.com/kuronosu/tela docs API-Reference-tela
h github.com/kuronosu/tela/h docs API-Reference-h
aria github.com/kuronosu/tela/aria docs API-Reference-aria
desktop github.com/kuronosu/tela/desktop docs API-Reference-desktop
telatest github.com/kuronosu/tela/telatest docs API-Reference-telatest
kit github.com/kuronosu/tela/kit docs API-Reference-kit

For LLM agents, docs/llms.txt is the whole guide in one file (the API, the kit, the tela mcp loop and a complete settings screen), with every code block checked against the API.

The design is in docs/ARCHITECTURE.md; full screens to imitate are in examples/.