ratatui-opentui-loader
KITT-style (Knight Rider) scanner/loader widget for ratatui.
Inspired by the opencode bottom-left spinner.

Features
- Bidirectional scanner with color trail (
■active,⬝inactive) - Trail dissolves at edges — no hard bounce
- Inactive dots "breathe" (fade in/out) during hold phases
- Asymmetric timing: brief pause at right edge, longer rest at left
- 34 built-in themes matching opencode (Dracula, Gruvbox, Catppuccin, Nord, Tokyonight, etc.)
- Custom accent color support
- Invertible trail for light backgrounds
- Implements
ratatui::Widget - Also exposes
into_line()for composing into larger widgets
Usage
use ;
// Create a loader and tick it each frame (~40ms)
let mut loader = with_theme;
loader.tick;
// As a Widget (auto-sizes to area)
frame.render_widget;
// As a Line (for composing)
let line = loader.into_line;
// With a custom color
let mut loader = with_color;
// Inverted trail for light backgrounds
let mut loader = with_theme.inverted;
Themes
All opencode dark-mode themes are built in:
Opencode, Dracula, Gruvbox, Catppuccin, Catppuccin Frappe, Catppuccin Macchiato, Nord, Tokyonight, Solarized, Rosepine, Ayu, Monokai, One Dark, Kanagawa, Material, Everforest, Github, Amoled, Aura, Carbonfox, Cobalt2, Cursor, Flexoki, Matrix, Mercury, Nightowl, Palenight, Shades of Purple, Synthwave '84, Vesper, Zenburn, Vercel, Orng, Osaka Jade.
Run the example
Use left/right arrows to page through all themes.
License
MIT