@sullux/tui
v1.0.2
Published
A declarative, component-driven UI framework for terminal grids using YAML and JavaScript
Maintainers
Readme
@sullux/tui
An enterprise-grade, declarative, component-driven User Interface framework designed from the ground up for terminal grids.
@sullux/tui solves the complexity of terminal UI development by cleanly separating markup structure and layout styling (expressed in logic-free YAML) from runtime behavior and event dispatching (expressed in pure, functional JavaScript).
Documentation
Full documentation is available in the docs/ directory:
- Introduction — The layout challenge and the declarative solution.
- Quick Start — Installation and building your first TUI application.
- Developer Guide
- Built-In Control Reference
- Examples
- License — MIT License details.
Quick Example
# view.yaml
type: border
borderStyle: rounded
borderFg: '#7aa2f7'
inner:
- type: text
bold: true
text: 'Hello from TUI YAML!'// app.js
const { Tui } = require('@sullux/tui')
const app = Tui({ view: './view.yaml' })
app.start()Contributing Guide
We prioritize clean, maintainable, and testable source files. All contributions must adhere to the following guidelines:
- Vanilla JavaScript: Vanilla Node.js ONLY. No TypeScript compilation, no build transpilation, no custom binary compilers. Standard imports strictly functional (CJS).
- Functional Paradigm over Object-Oriented: Zero classes. Zero usage of the
thiskeyword. Prefer pure, stateless factories that receive a state context object (ctx) and return immutable configurations. - Auditability & Standalone Modules: Keep files short (ideally under 100 lines). Sub-divide complicated modules into localized folders with an
index.jsfile to protect monorepo workspace imports. - Prettier Format Style: Standard Prettier formatting with explicit trailing commas and absolutely zero semicolons (enforced by
.prettierrc).
License
Distributed under the MIT License. See docs/license.md for full terms.
