Documentation
¶
Index ¶
- type Fragment
- type View
- func (v *View) Add(contents string) *Fragment
- func (v *View) Addf(format string, a ...any) *Fragment
- func (v *View) Addln(format string, a ...any) *Fragment
- func (v *View) Break()
- func (v *View) Render() string
- func (v *View) WithNewline(newline string) *View
- func (v *View) WithStyle(style lipgloss.Style) *View
- type ViewOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Fragment ¶
type Fragment struct {
// contains filtered or unexported fields
}
Fragment represents a UI element
func NewFragment ¶
NewFragment constructs a new fragment from its un-styled content
type View ¶
type View struct {
// contains filtered or unexported fields
}
func (*View) Addf ¶ added in v1.54.3
Add formats according to a format specifier and appends the resulting string to the view.
func (*View) Addln ¶
Addln formats according to a format specifier and appends the resulting string to the view, followed by a new line.
func (*View) WithNewline ¶
WithNewline sets a custom newline string for the view.
type ViewOption ¶
type ViewOption func(*View)
ViewOption is a function that configures a view.
func WithNewline ¶
func WithNewline(newline string) ViewOption
WithNewline sets a custom newline string for the view.
func WithStyle ¶
func WithStyle(style lipgloss.Style) ViewOption
WithStyle applies/updates the style of the view.
Click to show internal directories.
Click to hide internal directories.