tree

package
v0.151.0 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package tree wraps charm.land/lipgloss/v2/tree so packages outside the styling layer (notably internal/domain formatters) can render rounded-connector trees without importing lipgloss directly — the same leaf-package convention as internal/ui/styles/{colors,icons}. Output is plain text; connectors only.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Tree

type Tree struct {
	// contains filtered or unexported fields
}

Tree is a node in a connector tree. Start with Root; the zero value is not usable.

func Root

func Root(label string) *Tree

Root starts a new tree with the given label.

func (*Tree) Child

func (t *Tree) Child(children ...any) *Tree

Child appends children; each may be a string or a nested *Tree.

func (*Tree) Rounded

func (t *Tree) Rounded() *Tree

Rounded switches connectors to rounded glyphs (├──/╰──); children inherit it.

func (*Tree) String

func (t *Tree) String() string

String renders the tree to plain text.

Jump to

Keyboard shortcuts

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