helper

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Helper

type Helper struct {
	help.Model
	// contains filtered or unexported fields
}

Helper is a model that renders a help screen

func New

func New() Helper

New returns a new Helper model

func (Helper) Init

func (h Helper) Init() tea.Cmd

Init is a no-op.

func (Helper) Sections

func (h Helper) Sections(sections []Section) Helper

Sections sets the sections of the help screen. Previously added sections are discarded.

func (Helper) Styles

func (h Helper) Styles(styles Styles) Helper

Styles sets the styles of the help screen.

func (Helper) Update

func (h Helper) Update(_ tea.Msg) (tea.Model, tea.Cmd)

Update is a no-op.

func (Helper) View

func (h Helper) View() string

View renders the help screen.

func (Helper) Width

func (h Helper) Width(width int) Helper

Width sets the width of the help screen.

type Section

type Section struct {
	// Title is the title of the section
	Title string
	// Keys is a list of key bindings in this section
	Keys []key.Binding
}

Section is one section (or column) of the help screen

type Styles

type Styles struct {
	// Header formats the section header
	Header lipgloss.Style
	// Key formats the key
	Key lipgloss.Style
	// Desc formats the description
	Desc lipgloss.Style
}

Styles contains the styles for the help screen

Jump to

Keyboard shortcuts

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