notification

package
v1.18.0 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ErrorCmd

func ErrorCmd(text string) tea.Cmd

func InfoCmd

func InfoCmd(text string) tea.Cmd

func SuccessCmd

func SuccessCmd(text string) tea.Cmd

func WarningCmd

func WarningCmd(text string) tea.Cmd

Types

type HideMsg

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

type Manager

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

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

func (*Manager) Open

func (n *Manager) Open() bool

func (*Manager) SetSize

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

func (*Manager) Update

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

func (*Manager) View

func (n *Manager) View() string

type ShowMsg

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

type Type

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