TermMosaic v1.0.0

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.

Widgets by package

Core — widgets/block

pkg.go.dev/widgets/block

Widget Constructor MinSize() Captures
Block block.New(r buffer.Rect) *block.Block 5×5 40×9 × 80×9 × 120×9

Core — widgets/basic

pkg.go.dev/widgets/basic

Widget Constructor MinSize() Captures
Text basic.NewText(r buffer.Rect, spans []buffer.Span) *basic.Text — 40×3 × 80×3 × 120×3
Paragraph basic.NewParagraph(r buffer.Rect, spans []buffer.Span) *basic.Paragraph — 40×10 × 80×9 × 120×7

Core — widgets/split

pkg.go.dev/widgets/split

Widget Constructor MinSize() Captures
Split split.New(d layout.Direction, panes ...termmosaic.Widget) *split.Split 3×1 40×11 × 80×11 × 120×11

Forms — widgets/form

pkg.go.dev/widgets/form

Widget Constructor MinSize() Captures
TextInput form.NewTextInput(r buffer.Rect) *form.TextInput 1×1 40×3 × 80×3 × 120×3
TextArea form.NewTextArea(r buffer.Rect) *form.TextArea 1×1 40×7 × 80×7 × 120×7
Select form.NewSelect(r buffer.Rect, labels []string) *form.Select 1×1 40×9 × 80×9 × 120×9
Checkbox form.NewCheckbox(r buffer.Rect, label string) *form.Checkbox 1×5 40×5 × 80×5 × 120×5
Radio form.NewRadio(r buffer.Rect, labels []string) *form.Radio 6×1 40×6 × 80×6 × 120×6
Toggle form.NewToggle(r buffer.Rect, label string) *form.Toggle 6×1 40×3 × 80×3 × 120×3
Tabs form.NewTabs(r buffer.Rect, labels []string) *form.Tabs 1×1 40×4 × 80×4 × 120×4
Button form.NewButton(r buffer.Rect, label string) *form.Button 3×1 40×3 × 80×3 × 120×3
KeyHint form.NewKeyHint(r buffer.Rect, bindings []form.Binding) *form.KeyHint 1×1 40×3 × 80×3 × 120×3

Data — widgets/data

pkg.go.dev/widgets/data

Widget Constructor MinSize() Captures
List data.NewList(r buffer.Rect, items ...data.ListItem) *data.List 10×3 40×11 × 80×11 × 120×11
Table data.NewTable(r buffer.Rect, cols ...data.Column) *data.Table 12×4 40×10 × 80×10 × 120×10
Tree data.NewTree(r buffer.Rect, nodes ...data.Node) *data.Tree 14×4 40×13 × 80×13 × 120×13
Pager data.NewPager(r buffer.Rect) *data.Pager 10×4 40×11 × 80×11 × 120×11

Visualization — widgets/viz

pkg.go.dev/widgets/viz

Widget Constructor MinSize() Captures
ProgressBar viz.NewProgressBar(r buffer.Rect) *viz.ProgressBar 14×3 40×4 × 80×4 × 120×4
Gauge viz.NewGauge(r buffer.Rect) *viz.Gauge 11×7 40×11 × 80×9 × 120×9
Meter viz.NewMeter(r buffer.Rect) *viz.Meter 18×3 40×3 × 80×3 × 120×3
Sparkline viz.NewSparkline(r buffer.Rect) *viz.Sparkline 5×3 40×3 × 80×3 × 120×3
BarChart viz.NewBarChart(r buffer.Rect) *viz.BarChart 8×6 40×11 × 80×11 × 120×11

pkg.go.dev/widgets/menu

Widget Constructor MinSize() Captures
Menu menu.New(r buffer.Rect, items ...menu.Item) *menu.Menu 16×4 40×14 × 80×14 × 120×14

Modality — widgets/dialog

pkg.go.dev/widgets/dialog

Widget Constructor MinSize() Captures
Dialog 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
layout The constraint solver: Length, Min, Max, Percentage, Ratio, Fill, Solve, Rect. pkg.go.dev
input 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
widgets/basic Text and Paragraph. pkg.go.dev
widgets/split Split — the pane composer. pkg.go.dev
widgets/form TextInput, TextArea, Select, Checkbox, Radio, Toggle, Tabs, Button, KeyHint. pkg.go.dev
widgets/data List, Table, Tree, Pager. pkg.go.dev
widgets/viz ProgressBar, Gauge, Meter, Sparkline, BarChart. pkg.go.dev
widgets/menu 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

The one interface that is held fixed

type Widget interface {
    Bounds() Rect
    Draw(buf *buffer.Buffer)
    Invalidate()
    Handle(Event) bool
}

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.