Pure terminal widgets for Lean 4. Rendering returns styled TermColor.Text; timing, terminal
size, focus, and output remain with the caller.
Interactive terminal views should be reusable without coupling their rendering to clocks, input, or terminal output.
This project is maintained by its author with AI-assisted development tools. Changes are reviewed, tested, and remain the maintainer's responsibility.
Progress bars, indeterminate progress, spinners, status messages, tables, text input, sliders,
checkboxes, and buttons. Width-aware layout comes from
termcolor-layout.
import TermColor.Widgets
open TermColor TermColor.Widgets
def progress : Text := progressBar { width := 24 }
{ current := 7, total := 10, label := Text.plain "download" }
#eval progress.plainTextlake build TermColor.Widgets TermColor.Widgets.Properties demo
lake exe demotermcolor-terminal connects widgets
to live terminal output. termcolor supplies the
text foundation; lean-calc-chat and
oatp use the widgets in applications. Keep application
state and event handling outside this package.
Apache-2.0.
