Skip to content

Repository files navigation

lean-termcolor-widgets

CI Release Lean 4 Docs License

Pure terminal widgets for Lean 4. Rendering returns styled TermColor.Text; timing, terminal size, focus, and output remain with the caller.

Problem

Interactive terminal views should be reusable without coupling their rendering to clocks, input, or terminal output.

TermColor widgets demo

Development

This project is maintained by its author with AI-assisted development tools. Changes are reviewed, tested, and remain the maintainer's responsibility.

Widgets

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.plainText

Build

lake build TermColor.Widgets TermColor.Widgets.Properties demo
lake exe demo

Related projects

termcolor-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.

License

Apache-2.0.

About

Pure progress bars and spinners for Lean 4 terminals

Topics

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages