dialog

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DialogResultMsg

type DialogResultMsg struct {
	ID        string
	Confirmed bool
	Input     string
}

DialogResultMsg is emitted when a dialog is closed.

type Kind

type Kind int

Kind represents the type of dialog.

const (
	KindConfirm Kind = iota
	KindPrompt
	KindAlert
)

type Model

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

Model is a modal dialog component.

func NewAlert

func NewAlert(th *theme.Theme, id, title, message string) Model

NewAlert creates an alert dialog.

func NewConfirm

func NewConfirm(th *theme.Theme, id, title, message string) Model

NewConfirm creates a confirmation dialog.

func NewPrompt

func NewPrompt(th *theme.Theme, id, title, message string) Model

NewPrompt creates a prompt dialog with text input.

func (Model) IsVisible

func (m Model) IsVisible() bool

IsVisible returns whether the dialog is visible.

func (Model) Update

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

Update handles messages.

func (Model) View

func (m Model) View() string

View renders the dialog.

Jump to

Keyboard shortcuts

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