Skip to content

Release v0.0.3

Choose a tag to compare

@ImElio ImElio released this 02 Oct 16:44
· 7 commits to main since this release

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.
  • Style struct with chaining methods (Fg, Bg, Bolded, Underlined, etc.).
  • Named colors (ColorRed, ColorBrightGreen, …).
  • Colorize helper for quick styled output.
  • StripANSI utility for safe width calculations and plain rendering.

Layout utilities

  • Horizontal and vertical alignment (left, center, right / top, middle, bottom).
  • Center and PlaceBlock helpers 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 KeyQ for 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.