$ tui
A zero-dependency TypeScript Terminal UI component library.
Built entirely on ANSI escape codes. No external packages required.
$npm install @vr_patel/tui
0
Zero Dependencies
Pure ANSI escape codes. Only Node.js built-ins.
11
11 Components
Spinners, progress bars, tables, inputs, and more.
TS
TypeScript Native
Full strict mode with exported types and interfaces.
# Components
⠋
Spinner
9 animated loading indicator styles
█
ProgressBar
Gradient bars with ETA & percentage
╭
Box
6 border styles with titles & padding
❯
Select
Interactive keyboard-navigated menus
┌
Table
Formatted tables with auto-sizing
✦
Animated Text
Typewriter, wave, shimmer, bounce
✔
Toast
Success, error, warning, info messages
>
Input
Text input with validation & masking
?
Confirm
Yes/No confirmation prompt
●
List
6 list styles with nesting support
◆
Badge
Colored labels, outlines & dot indicators
# Quick Start
quickstart.ts
import { Spinner, ProgressBar, Box, toast, Badge } from "@vr_patel/tui";
// Spinner with live updates
const spinner = new Spinner({ text: "Loading...", style: "dots" });
spinner.start();
spinner.update("Almost there...");
spinner.stop("Done!");
// Progress bar with gradient
const bar = new ProgressBar({ total: 100, gradient: true });
bar.start("Building");
bar.update(50);
bar.finish("Build complete!");
// Box panel
const box = new Box({ title: "Status", borderStyle: "round" });
console.log(box.render("All systems operational"));
// Toast notification
console.log(toast.success("Deployed to production!"));
// Badge
console.log(Badge.success("PASS") + " " + Badge.outline("v1.0.0", fg.blue));