resq-tui — Shared TUI Library
A library crate providing standardized themes, layout components, and widgets for all ResQ developer TUIs. Built on top of ratatui and crossterm.
Core Features
- Theme Engine: Unified color palette and styling (
Theme). - Standard Headers/Footers: Consistent brand identity across all explorers.
- Interactive Widgets: Tabs, popups, and centered layouts.
- Formatting Utilities: Human-readable bytes and durations.
- Spinner Support: Standardized loading animations.
Usage (Internal Only)
Add to Cargo.toml:
[]
= { = true }
Rendering a Standard Header
use ;
Rendering a Footer with Shortcuts
draw_footer;
Formatting Bytes
use format_bytes;
let size = format_bytes; // "5.0 MiB"
Shared Components
| Component | Purpose |
|---|---|
Theme |
Standardized color definitions for ResQ brand |
draw_header |
Renders a ResQ-branded header with service metadata |
draw_footer |
Renders keyboard shortcuts in a stylized footer |
draw_tabs |
Renders a tab bar with selection highlights |
draw_popup |
Renders a centered modal for help or errors |
format_bytes |
Standardized human-readable byte sizing |
format_duration |
Standardized human-readable durations |
SPINNER_FRAMES |
Consistent loading indicator frames |