Guides
Guides
Composition, forms, data display, dashboards, performance and migration — task-shaped rather than widget-shaped.
Guides
The widget pages are organised by widget. These six are organised by task,
because most of the time you are not looking up “what does Split do” — you are
working out how to build something.
- Composing with Block — borders, padding, and solving a
layout against
Block.Interior()so your content stops knowing a border exists. - Forms — the nine form widgets as one workflow. Focus,
layout, validation, and why there is no
Formcontainer. - Data display — choosing between
List,Table,TreeandPager. - Dashboards — building a real screen, walking through
examples/markets. - Performance — every measured number on this site, and an explicit list of what is not measured.
- Migrating from another TUI — what carries over from
Bubble Tea, Ink or
tcell, and what does not.
A note on examples
There are four runnable programs today. The three to start with:
go run github.com/serkanalgur/termmosaic/examples/markets@v1.0.0 # live finance dashboard
go run github.com/serkanalgur/termmosaic/examples/hello@v1.0.0 # bordered panel, focus ring
go run github.com/serkanalgur/termmosaic/examples/search@v1.0.0 # search + results, real Wikipedia data
markets needs no API key and takes --offline for bundled sample data.
search also needs no API key, also takes --offline, and is the first
example with a focusable widget in the ring — the one to read when you want to
see the key contract under real focus rather than a screen-owned integer. All
three are keyboard- and mouse-driven; press ? in any of them for its key list.
examples/dashboardalso still exists and overlapsmarkets. Whether to keep it or retire it is undecided, so the guides point atmarketsand do not present the two as equally recommended. It has not been removed.
As of v1.0.0 every one of the 24 widgets has a runnable example — 74
func Example functions in the eight widgets/*/example_test.go files, each
rendered through widgets/widgettest. What does not exist is a runnable
program per widget, and there the count is still four — where a widget page
has no program to point at, that is the gap, and it is recorded on
Limitations rather than papered over. Widget pages
carry captured frames instead, and a capture cannot show interaction: see
Limitations.
Pages in this section
- Composing with Block Borders, padding and solving a layout against Block.Interior() so content never has to know a border exists.
- Forms The nine form widgets as one workflow — focus, layout, validation — and why there is no Form container.
- Data display Choosing between List, Table, Tree and Pager, and the traps each one has.
- Dashboards Building the examples/markets screen — three reflowing bands, real network data on a goroutine, a focus ring, and per-panel key routing.
- Performance Every measured number on this site, and an explicit list of what is not measured.
- Migrating from another TUI What carries over from Bubble Tea, Ink or tcell — and what does not.