Repository navigation
Release v0.0.3
This release introduces color and layout support, making Frog more expressive and professional for building TUIs.
Highlights
Color system
- Support for ANSI 16, ANSI 256, and TrueColor.
Stylestruct with chaining methods (Fg,Bg,Bolded,Underlined, etc.).- Named colors (
ColorRed,ColorBrightGreen, …). Colorizehelper for quick styled output.StripANSIutility for safe width calculations and plain rendering.
Layout utilities
- Horizontal and vertical alignment (left, center, right / top, middle, bottom).
CenterandPlaceBlockhelpers to position blocks inside a terminal area.- Proper width calculation ignoring ANSI codes.
Renderer improvements
- Auto-detect color profile (
NO_COLOR,COLORTERM, TERM, TTY check). - Option to force a specific profile with
WithColorProfile. - Safe ANSI stripping when colors are disabled.
Input improvements
- Added
KeyQfor quit shortcut. - Unified handling of UTF-8, ESC sequences, and Alt-modified keys.
Re-exports in frog.go
- Color constants and helpers (
NewStyle,RGB,ANSI256). - Layout helpers (
Center,PlaceBlock). - Renderer options (
WithDiff,WithColorProfile).
Examples
example/counter: refined keyboard handling.example/dashboard: mock CPU/RAM dashboard with aligned layout.example/loading: color loading animation with styles.example/progress-static: static gradient progress bar centered on screen.
Notes
This release sets the foundation for professional-grade TUIs with styled text, alignment, and color rendering. Future versions will expand components, widgets, and themes.