notification

package
v1.16.0 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ErrorCmd added in v1.15.4

func ErrorCmd(text string) tea.Cmd

func InfoCmd added in v1.16.0

func InfoCmd(text string) tea.Cmd

func SuccessCmd added in v1.15.4

func SuccessCmd(text string) tea.Cmd

func WarningCmd added in v1.15.4

func WarningCmd(text string) tea.Cmd

Types

type HideMsg

type HideMsg struct {
	ID uint64 // If 0, hides all notifications (backward compatibility)
}

type Manager added in v1.9.4

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

Manager represents a notification manager that displays multiple stacked messages in the bottom right corner of the screen

func New

func New() Manager

func (*Manager) GetLayer added in v1.9.4

func (n *Manager) GetLayer() *lipgloss.Layer

func (*Manager) Open added in v1.9.4

func (n *Manager) Open() bool

func (*Manager) SetSize added in v1.9.4

func (n *Manager) SetSize(width, height int)

func (*Manager) Update added in v1.9.4

func (n *Manager) Update(msg tea.Msg) (Manager, tea.Cmd)

func (*Manager) View added in v1.9.4

func (n *Manager) View() string

type ShowMsg

type ShowMsg struct {
	Text string
	Type Type // Defaults to TypeSuccess for backward compatibility
}

type Type added in v1.9.4

type Type int

Type represents the type of notification

const (
	TypeSuccess Type = iota
	TypeWarning
	TypeInfo
	TypeError
)

Jump to

Keyboard shortcuts

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