components

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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

Breadcrumb renders a navigation path.

func NewBreadcrumb

func NewBreadcrumb() Breadcrumb

NewBreadcrumb creates a new Breadcrumb.

func (b *Breadcrumb) SetItems(items []string)

SetItems sets the breadcrumb path items.

func (b *Breadcrumb) SetSize(w int)

SetSize updates the breadcrumb width.

func (b Breadcrumb) View() string

View renders the breadcrumb.

type Confirm

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

Confirm is a confirmation dialog component.

func NewConfirm

func NewConfirm() Confirm

NewConfirm creates a new Confirm dialog.

func (*Confirm) Hide

func (c *Confirm) Hide()

Hide hides the dialog.

func (*Confirm) IsVisible

func (c *Confirm) IsVisible() bool

IsVisible returns whether the dialog is showing.

func (*Confirm) SetSize

func (c *Confirm) SetSize(w int)

SetSize updates the dialog width.

func (*Confirm) Show

func (c *Confirm) Show(displayName, resourceName string, force bool)

Show displays the confirmation dialog.

func (*Confirm) Update

func (c *Confirm) Update(msg tea.KeyMsg) tea.Cmd

Update handles key events.

func (Confirm) View

func (c Confirm) View() string

View renders the dialog.

type ConfirmResult

type ConfirmResult struct {
	Confirmed    bool
	ResourceName string
	Force        bool
}

ConfirmResult is sent when the user answers the confirmation.

type Flash

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

Flash displays temporary messages.

func NewFlash

func NewFlash() Flash

NewFlash creates a new Flash component.

func (*Flash) SetSize

func (f *Flash) SetSize(w int)

SetSize updates the flash width.

func (*Flash) Show

func (f *Flash) Show(msg string, level ui.FlashLevel) tea.Cmd

Show displays a flash message and returns a command to auto-dismiss.

func (*Flash) Update

func (f *Flash) Update(msg tea.Msg)

Update handles flash messages.

func (Flash) View

func (f Flash) View() string

View renders the flash message.

type KeyHint

type KeyHint struct {
	Key  string
	Desc string
}

KeyHint represents a single key-action hint.

type StatusBar

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

StatusBar renders key hints at the bottom of the screen.

func NewStatusBar

func NewStatusBar() StatusBar

NewStatusBar creates a new StatusBar.

func (*StatusBar) SetHints

func (s *StatusBar) SetHints(hints []KeyHint)

SetHints sets the key hints to display.

func (*StatusBar) SetSize

func (s *StatusBar) SetSize(w int)

SetSize updates the status bar width.

func (StatusBar) View

func (s StatusBar) View() string

View renders the status bar.

type Table

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

Table is a custom table component with selection, sorting and filtering.

func NewTable

func NewTable(columns []string, keys ui.KeyMap) Table

NewTable creates a new Table with the given columns.

func (*Table) ClearSelection

func (t *Table) ClearSelection()

ClearSelection clears all multi-selections.

func (*Table) RowCount

func (t *Table) RowCount() int

RowCount returns the number of visible rows.

func (*Table) SelectedCount

func (t *Table) SelectedCount() int

SelectedCount returns the number of selected rows.

func (*Table) SelectedIndex

func (t *Table) SelectedIndex() int

SelectedIndex returns the original row index of the currently selected row.

func (*Table) SelectedIndices

func (t *Table) SelectedIndices() []int

SelectedIndices returns all multi-selected row indices. If nothing is selected, returns nil.

func (*Table) SelectedRow

func (t *Table) SelectedRow() []string

SelectedRow returns the currently selected row data.

func (*Table) SetFilter

func (t *Table) SetFilter(f string)

SetFilter sets the filter string.

func (*Table) SetRows

func (t *Table) SetRows(rows [][]string)

SetRows replaces the table data and clears selections.

func (*Table) SetSize

func (t *Table) SetSize(w, h int)

SetSize updates the table dimensions.

func (*Table) ToggleSelect

func (t *Table) ToggleSelect()

ToggleSelect toggles the selection of the current row.

func (*Table) Update

func (t *Table) Update(msg tea.KeyMsg)

Update handles key events for table navigation.

func (*Table) View

func (t *Table) View() string

View renders the table.

Jump to

Keyboard shortcuts

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