summaryrefslogtreecommitdiff
path: root/internal/tui/styles.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-02-23 23:27:26 +0200
committerPaul Buetow <paul@buetow.org>2026-02-23 23:27:26 +0200
commit72daf71f04c06660a9abf588f046a30f8b68b4a9 (patch)
treedfc17a31992d3f9cf363f4e8cedc273ee5166fb0 /internal/tui/styles.go
parent0bfeccbed6edb106670024373e46b3891463920c (diff)
task 302: add shared tui styles and key bindings
Diffstat (limited to 'internal/tui/styles.go')
-rw-r--r--internal/tui/styles.go61
1 files changed, 61 insertions, 0 deletions
diff --git a/internal/tui/styles.go b/internal/tui/styles.go
new file mode 100644
index 0000000..7bbe836
--- /dev/null
+++ b/internal/tui/styles.go
@@ -0,0 +1,61 @@
+package tui
+
+import "github.com/charmbracelet/lipgloss"
+
+var (
+ // Palette colors shared across the TUI package.
+ ColorBackground = lipgloss.Color("235")
+ ColorPanel = lipgloss.Color("238")
+ ColorPrimary = lipgloss.Color("75")
+ ColorAccent = lipgloss.Color("222")
+ ColorMuted = lipgloss.Color("246")
+ ColorText = lipgloss.Color("255")
+ ColorDanger = lipgloss.Color("203")
+)
+
+var (
+ // ScreenStyle is the base style for full-screen models.
+ ScreenStyle = lipgloss.NewStyle().
+ Foreground(ColorText).
+ Background(ColorBackground)
+
+ // HeaderStyle is used by top-level titles and screen headers.
+ HeaderStyle = lipgloss.NewStyle().
+ Bold(true).
+ Foreground(ColorPrimary)
+
+ // TabActiveStyle is applied to the currently-selected tab.
+ TabActiveStyle = lipgloss.NewStyle().
+ Bold(true).
+ Foreground(ColorBackground).
+ Background(ColorPrimary).
+ Padding(0, 1)
+
+ // TabInactiveStyle is applied to non-selected tabs.
+ TabInactiveStyle = lipgloss.NewStyle().
+ Foreground(ColorMuted).
+ Background(ColorPanel).
+ Padding(0, 1)
+
+ // PanelStyle is used for boxed sections.
+ PanelStyle = lipgloss.NewStyle().
+ Border(lipgloss.NormalBorder()).
+ BorderForeground(ColorPanel).
+ Padding(0, 1)
+
+ // HelpBarStyle is used for keybinding hints at the bottom.
+ HelpBarStyle = lipgloss.NewStyle().
+ Foreground(ColorMuted).
+ BorderTop(true).
+ BorderForeground(ColorPanel)
+
+ // HighlightStyle emphasizes inline values.
+ HighlightStyle = lipgloss.NewStyle().
+ Bold(true).
+ Foreground(ColorAccent)
+
+ // ErrorStyle is used for fatal or warning messages.
+ ErrorStyle = lipgloss.NewStyle().
+ Bold(true).
+ Foreground(ColorDanger)
+)