# Terminal UI Context **Purpose**: Terminal UI (TUI) patterns, CLI animations, and command-line interface design **Last Updated**: 2026-01-07 --- ## Overview This subcategory will contain patterns and best practices for building terminal user interfaces using libraries like Ink, Blessed, and native terminal capabilities. --- ## Planned Content ### Core Files (Future) | File | Description | Priority | |------|-------------|----------| | `tui-patterns.md` | Terminal UI component patterns and layouts | high | | `cli-animations.md` | Terminal animations, spinners, progress bars | high | | `ink-components.md` | React Ink component patterns | medium | | `blessed-patterns.md` | Blessed.js patterns and widgets | medium | | `terminal-styling.md` | ANSI colors, chalk, terminal theming | medium | ### Planned Topics - **Layout patterns**: Boxes, borders, flexbox-like layouts - **Interactive components**: Menus, forms, selects, inputs - **Progress indicators**: Spinners, progress bars, loading states - **Terminal animations**: Frame-based animations, smooth transitions - **Color and styling**: ANSI escape codes, chalk, gradient text - **Keyboard handling**: Key bindings, shortcuts, navigation - **Terminal detection**: Capability detection, fallbacks --- ## Example Libraries ### React-based TUI - **Ink** - React for CLIs - **Pastel** - React-like TUI framework ### Traditional TUI - **Blessed** - High-level terminal interface library - **Blessed-contrib** - Widgets for blessed (charts, gauges) - **Terminal-kit** - Comprehensive terminal manipulation ### Styling - **Chalk** - Terminal string styling - **Gradient-string** - Gradient colors in terminal - **Boxen** - Create boxes in terminal ### Progress/Animation - **Ora** - Elegant terminal spinners - **CLI-progress** - Progress bars - **Listr** - Terminal task lists --- ## Usage **When this subcategory is populated**, use it for: - Building CLI tools with rich interfaces - Creating terminal-based dashboards - Implementing interactive command-line applications - Adding animations and progress indicators to CLI tools --- ## Related Categories - `ui/web/` - Web UI patterns - `development/` - General development patterns --- ## Status ⏳ **Placeholder** - This subcategory is planned but not yet populated. To contribute content here, follow the MVI principles: 1. Extract core concepts (1-3 sentences) 2. List key points (3-5 bullets) 3. Provide minimal example 4. Link to full documentation --- ## Used By **Agents**: cli-developer, terminal-specialist, devops-specialist (future)