examples/

directory
v0.26.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 12, 2026 License: MIT

Directories

Path Synopsis
components
form
Package form demonstrates pkg/form: a vertical form with Text, Password, Select, and Confirm fields.
Package form demonstrates pkg/form: a vertical form with Text, Password, Select, and Confirm fields.
inspector
Package inspector demonstrates pkg/inspector — a two-column label/value viewer with expand/collapse for nested structured records.
Package inspector demonstrates pkg/inspector — a two-column label/value viewer with expand/collapse for nested structured records.
list
Package list demonstrates a filterable list.Model as a single-screen app.
Package list demonstrates a filterable list.Model as a single-screen app.
logview
Package logview demonstrates pkg/logview as a single-screen app: a synthetic log stream you can search ("/"), jump between matches (n/N), scroll (pgup/pgdn/arrows), and pin (G to follow, g to top).
Package logview demonstrates pkg/logview as a single-screen app: a synthetic log stream you can search ("/"), jump between matches (n/N), scroll (pgup/pgdn/arrows), and pin (G to follow, g to top).
metrics
Package metrics demonstrates pkg/metrics inline primitives — Badge, Ratio, Bar, Spark — composed into a polled deployments table.
Package metrics demonstrates pkg/metrics inline primitives — Badge, Ratio, Bar, Spark — composed into a polled deployments table.
pane
Package pane demonstrates pane border styles, title positions, and slot-bracket variants in a single screen.
Package pane demonstrates pane border styles, title positions, and slot-bracket variants in a single screen.
table
Package table demonstrates pkg/table — a filterable cursor-driven tabular view with a sticky header.
Package table demonstrates pkg/table — a filterable cursor-driven tabular view with a sticky header.
textview
Package textview demonstrates pkg/textview: a read-only viewer for static text content with search, wrap toggle, and vim-style navigation.
Package textview demonstrates pkg/textview: a read-only viewer for static text content with search, wrap toggle, and vim-style navigation.
tree
Package tree demonstrates pkg/tree as a single-screen app: a synthetic project layout you can expand/collapse, search ("/"), and filter ("\") down to matching subtrees.
Package tree demonstrates pkg/tree as a single-screen app: a synthetic project layout you can expand/collapse, search ("/"), and filter ("\") down to matching subtrees.
Launcher: the single entry point for tuilib examples.
Launcher: the single entry point for tuilib examples.
patterns
actions
Package actions demonstrates pkg/action end to end: a screen declares what can be done to the current selection, and the app shell does everything else.
Package actions demonstrates pkg/action end to end: a screen declares what can be done to the current selection, and the app shell does everything else.
capture
Package capture demonstrates streaming a subprocess's output into an on-screen pkg/logview with runner.Capture, next to a command picker, with tab cycling focus between the two.
Package capture demonstrates streaming a subprocess's output into an on-screen pkg/logview with runner.Capture, next to a command picker, with tab cycling focus between the two.
drilldown
Package drilldown demonstrates a master-detail screen with async fetches at both levels, plus a third level via push:
Package drilldown demonstrates a master-detail screen with async fetches at both levels, plus a third level via push:
filters
Package filters is a two-filterable-pane screen — the shape that exposes how focus behaves when a component has more than one place to type.
Package filters is a two-filterable-pane screen — the shape that exposes how focus behaves when a component has more than one place to type.
focus
Package focus demonstrates a screen with multiple components sharing one keyboard, using pkg/focus to decide which of them has it.
Package focus demonstrates a screen with multiple components sharing one keyboard, using pkg/focus to decide which of them has it.
loading
Package loading demonstrates pkg/pane's loading state across a list, a logview, and a tree.
Package loading demonstrates pkg/pane's loading state across a list, a logview, and a tree.
modals
Package modals demonstrates the three weights of feedback a screen can give, on one list of operations, so the difference between them is visible side by side rather than across two demos:
Package modals demonstrates the three weights of feedback a screen can give, on one list of operations, so the difference between them is visible side by side rather than across two demos:
mouse
Package mouse demonstrates the click, double-click, wheel and drag affordances tuilib components expose when the app shell enables mouse input (app.Options.Mouse = app.MouseClick).
Package mouse demonstrates the click, double-click, wheel and drag affordances tuilib components expose when the app shell enables mouse input (app.Options.Mouse = app.MouseClick).
multiselect
Package multiselect demonstrates marking — the multi-selection a user builds with space — on a table.Model, and the action.Set that acts on it.
Package multiselect demonstrates marking — the multi-selection a user builds with space — on a table.Model, and the action.Set that acts on it.
poll
Package poll demonstrates pkg/poll driving auto-refresh of a list, with keyed items so the user's cursor survives every refresh even as the underlying set churns.
Package poll demonstrates pkg/poll driving auto-refresh of a list, with keyed items so the user's cursor survives every refresh even as the underlying set churns.
remote
Package remote demonstrates the full windowed-source loop: pkg/source coordinating a sparse pkg/table over a simulated paged HTTP API.
Package remote demonstrates the full windowed-source loop: pkg/source coordinating a sparse pkg/table over a simulated paged HTTP API.
runner
Package runner demonstrates pkg/runner: pick an interactive subprocess from a list, hand the terminal to it, and return to the TUI on exit.
Package runner demonstrates pkg/runner: pick an interactive subprocess from a list, hand the terminal to it, and return to the TUI on exit.
treeactions
Package treeactions demonstrates marking and pkg/action on a tree: a cluster-shaped resource hierarchy where you mark nodes at any depth and run verbs over the selection.
Package treeactions demonstrates marking and pkg/action on a tree: a cluster-shaped resource hierarchy where you mark nodes at any depth and run verbs over the selection.
shell
chrome
Package chrome demonstrates theme-owned border shape: the two slots a Theme carries for chrome, and the fact that changing one re-skins every component drawn from that theme without touching any component.
Package chrome demonstrates theme-owned border shape: the two slots a Theme carries for chrome, and the fact that changing one re-skins every component drawn from that theme without touching any component.
layouts
Package layouts demonstrates that pkg/layout can describe arbitrary compositions without the caller doing "m.h-2" math.
Package layouts demonstrates that pkg/layout can describe arbitrary compositions without the caller doing "m.h-2" math.
output
Package output demonstrates the app-wide output console: everything the app has said, kept, and readable long after the statusbar wiped it.
Package output demonstrates the app-wide output console: everything the app has said, kept, and readable long after the statusbar wiped it.
prescreen
Package prescreen demonstrates pushing a screen *in front of* another one on first activation, and taking a result back when it pops — the shape behind "log in before you can use this", "pick a workspace first", or "re-authenticate, that token expired".
Package prescreen demonstrates pushing a screen *in front of* another one on first activation, and taking a result back when it pops — the shape behind "log in before you can use this", "pick a workspace first", or "re-authenticate, that token expired".
stack
Package stack demonstrates a screen stack: how screens are pushed and popped, how data flows between them, and how a screen replaces itself.
Package stack demonstrates a screen stack: how screens are pushed and popped, how data flows between them, and how a screen replaces itself.
status
Package status demonstrates how a screen sends transient feedback to the app's statusbar.
Package status demonstrates how a screen sends transient feedback to the app's statusbar.
tabs
Package tabs demonstrates pkg/tab as the layout primitive of a host screen.
Package tabs demonstrates pkg/tab as the layout primitive of a host screen.
themes
Package themecheck is an interactive theme picker.
Package themecheck is an interactive theme picker.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL