help

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

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

Builder provides a fluent interface for creating help models

func NewBuilder

func NewBuilder() *Builder

NewBuilder creates a new help builder

func (*Builder) Build

func (b *Builder) Build() Model

Build creates the help model

func (*Builder) ShowAll

func (b *Builder) ShowAll(show bool) *Builder

ShowAll sets whether to show all help initially

func (*Builder) WithCustomHelp

func (b *Builder) WithCustomHelp(customHelp [][]key.Binding) *Builder

WithCustomHelp adds custom help bindings

func (*Builder) WithKeys

func (b *Builder) WithKeys(keys interface{}) *Builder

WithKeys sets the keymap

func (*Builder) WithSize

func (b *Builder) WithSize(width, height int) *Builder

WithSize sets the initial size

func (*Builder) WithTheme

func (b *Builder) WithTheme(t *theme.Theme) *Builder

WithTheme sets the theme

func (*Builder) WithTitle

func (b *Builder) WithTitle(title string) *Builder

WithTitle sets the title for the full help view dialog

type Model

type Model struct {
	Keys       interface{} // Can be keymap.Base or any extended keymap
	ShowAll    bool
	Width      int
	Height     int
	Theme      *theme.Theme
	CustomHelp [][]key.Binding // Additional custom key bindings to display
	Title      string          // Title for the full help view
	// contains filtered or unexported fields
}

Model represents an embeddable help component

func New

func New(keys interface{}) Model

New creates a new help model with default settings

func (*Model) SetCustomHelp

func (m *Model) SetCustomHelp(customHelp [][]key.Binding)

SetCustomHelp sets additional custom key bindings to display

func (*Model) SetKeys

func (m *Model) SetKeys(keys interface{})

SetKeys updates the keymap for the help view

func (*Model) SetSize

func (m *Model) SetSize(width, height int)

SetSize sets the dimensions of the help view

func (*Model) Toggle

func (m *Model) Toggle()

Toggle toggles between showing all help and short help. When showing, it recalculates content layout and resets the scroll position.

func (Model) Update

func (m Model) Update(msg tea.Msg) (Model, tea.Cmd)

Update handles messages for the help component

func (Model) View

func (m Model) View() string

View renders the help component

Jump to

Keyboard shortcuts

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