Documentation
¶
Overview ¶
Copyright (c) 2025 Nexlayer. All rights reserved.n// Use of this source code is governed by an MIT-stylen// license that can be found in the LICENSE file.nn
Package ui provides utilities for rendering styled text and UI elements in the CLI. It uses lipgloss and color packages to create a consistent and visually appealing command-line interface with support for colors, borders, and formatted tables.
Index ¶
- func RenderBox(text string) string
- func RenderError(msg string) string
- func RenderHighlight(text string) string
- func RenderInfo(msg string) string
- func RenderSuccess(msg string) string
- func RenderTable(headers []string, rows [][]string) string
- func RenderTitle(title string) string
- func RenderTitleWithBorder(title string) string
- func RenderWarning(msg string) string
- func RenderWelcome() string
- func SelectTemplate(detectedTemplate string) (string, error)
- type Manager
- type ProgressTracker
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RenderError ¶
RenderError formats an error message in a bold red style using errorStyle. Returns the formatted error message string.
func RenderHighlight ¶
RenderHighlight renders text in the highlight style
func RenderInfo ¶
RenderInfo formats an informational message in blue using color.BlueString. Returns the formatted informational message string.
func RenderSuccess ¶
RenderSuccess formats a success message in a bold green style using successStyle. Returns the formatted success message string.
func RenderTable ¶
RenderTable creates a textual table from headers and rows.
func RenderTitle ¶
RenderTitle renders a title with an optional subtitle.
func RenderTitleWithBorder ¶
RenderTitleWithBorder renders a title enclosed in a decorative border using titleStyle. Returns the formatted title string with a border.
func RenderWarning ¶
RenderWarning formats a warning message in yellow using color.YellowString. Returns the formatted warning message string.
func SelectTemplate ¶
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager handles UI interactions and progress tracking
func (*Manager) CompleteProgress ¶
CompleteProgress marks progress as complete for a given ID
func (*Manager) FailProgress ¶
FailProgress marks progress as failed for a given ID
func (*Manager) StartProgress ¶
StartProgress starts tracking progress for a given ID
type ProgressTracker ¶
ProgressTracker defines the interface for tracking progress