button

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2026 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Model

type Model struct {
	FocusStyle   lipgloss.Style
	BlurredStyle lipgloss.Style

	Invalid bool
	// contains filtered or unexported fields
}

Model is the model for a button.

func New

func New(text string) Model

New returns a new button model.

func (*Model) Blur

func (m *Model) Blur()

Blur sets the focus flag to false.

func (*Model) Focus

func (m *Model) Focus() tea.Cmd

Focus sets the focus flag to true.

func (*Model) Focused

func (m *Model) Focused() bool

Focused returns true if the button is focused.

func (Model) Init

func (m Model) Init() tea.Cmd

Init initializes the button.

func (Model) Update

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

Update updates the button.

func (Model) View

func (m Model) View() string

View renders the button.

type Pressed

type Pressed bool

Pressed is a flag that is enabled when the button is pressed.

Jump to

Keyboard shortcuts

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