panel

command
v0.2.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 2, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

README

Panel Example

This example shows framed callout text that shrinks toward content width and stays within the current terminal width.

Panel example

Run

go run ./examples/panel --format human --style always
COLUMNS=72 go run ./examples/panel --format human --style always --content long --max-width 48 --wrap-mode auto
COLUMNS=72 go run ./examples/panel --format human --style always --content long --max-width 48 --wrap-mode truncate

Real Library Shape

_ = printer.Panel(laslig.Panel{
	Title:    "Release note",
	Body:     "Panels are for rationale, larger callouts, and next-step context.",
	Footer:   "Keep the text readable without forcing a full-width block.",
	MaxWidth: 42,
	WrapMode: laslig.TableWrapAuto,
})

Panels reuse the same TableWrapMode enum as tables, code blocks, and log blocks. auto wraps to fit the budget. truncate and never are separate API names for caller intent, but they currently render the same way on purpose.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL