@timmo001/groundwork-tui
Groundwork's terminal components: OpenTUI renderables and formatters on the terminal tokens, so every Groundwork TUI has the same look and keys.
import { AppHeader, formatHelpBar, loadTheme } from "@timmo001/groundwork-tui";
loadThemereadsGW_THEMEandGW_MODE. WithoutGW_THEMEit's the desktop's Omarchy theme where there is one, otherwise Base and dark.themeForpicks a theme and mode directly, andomarchyThemeFormaps an Omarchycolors.toml.AppHeaderandPaneHeaderare one-row titles.HeaderBlockis the app's name as ASCII art overformatHeaderBar, a breadcrumb with a status dot and details that drop off when the terminal is narrow.formatBreadcrumb,formatFilterBarandformatHelpBarbuild the title trail, the filter line and the key hints along the bottom.MenuListis a filterable list of two-line rows, with group headings and paging.StatusListis a plain list of labelled values.MenuGridlays outTilecards underSectionHeadingrows, with arrow keys moving to the nearest tile.ScrollSurfaceis a themed scroll box, andsurfaceBackgroundits color.Button,Input,RadioGroupandCollapsibleare the focusable controls: Enter or Space (or a click) presses, picks or toggles.Dialogis a centered panel, one open at a time, closed by Escape or a click outside.ConfirmDialogasks yes or no (Cancel has focus), andChoiceDialogpicks from a list.Toastis a single self-closing message for results nothing else on screen can show.
templates/tui-menu shows the components, and runs with mise run demo:tui.