v1.0.0 is the first release that makes a stability promise: the public
API freezes here and Semantic Versioning applies in earnest — with one documented exception:
widgets/widgettest is excluded from that promise, because it must evolve with the framework.
Read the limitations before you rely on anything here.
Reference
Catalog and API
Generated from the framework's capture manifest: every widget, its constructor, its MinSize and its capture sizes.
Catalog and API
This page is generated by scripts/gen_reference.py from
static/captures/manifest.json, which is itself produced by
cmd/capture in the framework repository. It therefore cannot claim
anything the framework does not do: every row below is a fact about a
widget that was constructed and rendered.
24 widgets. Counted, not estimated — see
the catalog index for what is and is not included.
pkg.go.dev is the authority on signatures.https://pkg.go.dev/github.com/serkanalgur/termmosaic is generated from the source and can
never be out of date. This page is generated from a build artefact,
which is a weaker guarantee, and it exists because it carries the
things godoc does not: MinSize(), the capture widths, and which
package each widget belongs to.
dialog.New(r buffer.Rect, v dialog.Variant) *dialog.Dialog
28×4
40×11 × 80×11 × 120×11
MinSize() includes the widget’s own chrome, and every value above
was called, not parsed — NewTable(rect, cols).MinSize() returns the
real answer even though the thresholds are private constants. The
framework does nothing with it; what to do when the available space is
below it is the application’s decision.
Packages
Package
What it holds
(root)
The root package: the Widget, Focusable and Minimizable interfaces, plus the event types. pkg.go.dev
buffer
The 16-byte Cell, Buffer, SubBuffer, Span, Style, Colour, borders and the span writers. pkg.go.dev
geometry
Rectangles, Align, ClampCount, Budget, Region and Priority — the shared responsive arithmetic. pkg.go.dev
Decode, Parser, Source, Config — the input layer. pkg.go.dev
render
Renderer, Config, Pacer, the cursor, and the encode-time colour and NO_COLOR decisions. pkg.go.dev
term
Terminal and Sink — the two narrow interfaces, with the x/sys implementation and the headless sink. pkg.go.dev
headless
The in-memory Sink and its cell-grid screen model, for tests without a terminal. pkg.go.dev
virtual
The row-virtualization engine shared by List, Table and Tree. pkg.go.dev
keymap
Named commands and chords: Command, CommandID, Binding, Entry, Ctx, a 16-byte comparable Chord, and resolution by context specificity at 0 allocs. Shipped in v0.6.0. pkg.go.dev
widgets/block
Block — the catalog’s only owner of borders and titles. pkg.go.dev
Menu — a navigable tree with submenus to arbitrary depth. pkg.go.dev
widgets/dialog
Dialog — a modal with info, confirm and choice variants. pkg.go.dev
widgets/cacheaudit
The catalog-wide cache-audit gate (ADR 0007 §3): every finding fails the build. pkg.go.dev
widgets/widgettest
The headless widget-test harness: Capture, the cache-audit helpers, and the screen model the examples assert against. Public, and explicitly excluded from the v1.0.0 stability promise — decided 2026-10-06: it is a test harness that must evolve with the framework.pkg.go.dev
Four methods, unchanged across all ten architecture decisions, and
frozen at v1.0.0 under the stability promise. That is the most stable
thing in the project: a widget written against it today is the part most
likely to still compile at v1.1.0. The two optional interfaces are
Focusable and Minimizable — both discoverable by a type assertion,
both costing nothing to omit.
See Widgets and focus for what Draw may
and may not do, and ADR 0003 for why the
interface is this small.
Related
The catalog — the same 24, one page each, with captures.