Versions in this module Expand all Collapse all v0 v0.1.0 Oct 7, 2026 Changes in this version + const AnnounceTTL + const DefaultCapabilityProbeTimeout + const DefaultInspectorKey + const DefaultInspectorLayoutKey + const DefaultInspectorMessagesKey + const DefaultInspectorModelKey + const InspectorOff + const KeyBackspace + const KeyCtrl + const KeyCtrlC + const KeyDelete + const KeyDown + const KeyEnd + const KeyEnter + const KeyEsc + const KeyF1 + const KeyF10 + const KeyF11 + const KeyF12 + const KeyF13 + const KeyF14 + const KeyF15 + const KeyF16 + const KeyF17 + const KeyF18 + const KeyF19 + const KeyF2 + const KeyF20 + const KeyF21 + const KeyF22 + const KeyF23 + const KeyF24 + const KeyF3 + const KeyF4 + const KeyF5 + const KeyF6 + const KeyF7 + const KeyF8 + const KeyF9 + const KeyHome + const KeyInsert + const KeyLeft + const KeyMediaFastForward + const KeyMediaMute + const KeyMediaPause + const KeyMediaPlay + const KeyMediaPlayPause + const KeyMediaRecord + const KeyMediaReverse + const KeyMediaRewind + const KeyMediaStop + const KeyMediaTrackNext + const KeyMediaTrackPrevious + const KeyMediaVolumeDown + const KeyMediaVolumeUp + const KeyPgDown + const KeyPgUp + const KeyPress + const KeyRelease + const KeyRepeat + const KeyRight + const KeyRunes + const KeySpace + const KeyTab + const KeyUnknown + const KeyUp + const MouseActionMotion + const MouseActionPress + const MouseActionRelease + const MouseButton10 + const MouseButton11 + const MouseButtonBack + const MouseButtonForward + const MouseButtonLeft + const MouseButtonMiddle + const MouseButtonNone + const MouseButtonRight + const MouseButtonWheelDown + const MouseButtonWheelLeft + const MouseButtonWheelRight + const MouseButtonWheelUp + var ErrInterrupted = errors.New("tui: interrupted by signal") + var ErrProgramReused = errors.New("tui: Program.Run called more than once; build a new Program with NewProgram") + func DrawChild(buf *cellbuf.Buffer, r cellbuf.Rect, child Model) + func DrawView(buf *cellbuf.Buffer, r cellbuf.Rect, view string) + func LogToFile(path, prefix string) (*os.File, error) + type AnnounceLevel int + const Assertive + const Polite + type BackgroundColorEvent = input.BackgroundColorEvent + type BackgroundUnknownMsg = input.BackgroundUnknownMsg + type BindingsProvider interface + Bindings func() []keymap.Binding + type Capabilities struct + GraphemeClusters bool + InlineImages bool + KittyGraphics bool + KittyKeyboard bool + Notifications bool + Sixel bool + StyledUnderline bool + SyncOutput bool + XTVersion string + type CapabilitiesMsg struct + Capabilities Capabilities + type CellDrawer interface + DrawCells func(buf *cellbuf.Buffer, r cellbuf.Rect) + type ChordDef = input.ChordDef + type ChordMsg = input.ChordMsg + type ClipboardMsg struct + Err error + Text string + type Clock interface + NewTicker func(d time.Duration) (<-chan time.Time, func()) + type Cmd func() Msg + func Announce(text string) Cmd + func AnnounceWith(text string, level AnnounceLevel) Cmd + func Batch(cmds ...Cmd) Cmd + func ClearScreen() Cmd + func EnableMouse(mode MouseMode) Cmd + func EnterAltScreen() Cmd + func Eprintln(text string) Cmd + func Every(d time.Duration, fn func(time.Time) Msg) (Cmd, func()) + func ExitAltScreen() Cmd + func FromCtx(fn CtxCmd) Cmd + func Go(fn func(ctx context.Context) Msg) Cmd + func PasteCopied() Cmd + func Println(text string) Cmd + func Quit() Cmd + func ReadClipboard() Cmd + func Sequence(cmds ...Cmd) Cmd + func SetCursorShape(s CursorShape) Cmd + func SetWindowTitle(title string) Cmd + func Suspend(fn func() error) Cmd + func Tick(d time.Duration, fn func(time.Time) Msg) Cmd + func WriteClipboard(text string) Cmd + type Component interface + Update func(Msg) (T, Cmd) + View func() string + type CtxCmd func(context.Context) Msg + func TickCtx(d time.Duration, fn func(time.Time) Msg) CtxCmd + type CursorPlacer interface + CursorPos func() (x, y int, ok bool) + type CursorProvider interface + CursorCell func() (x, y int, ok bool) + type CursorShape int + const CursorShapeBlinkingBar + const CursorShapeBlinkingBlock + const CursorShapeBlinkingUnderline + const CursorShapeDefault + const CursorShapeSteadyBar + const CursorShapeSteadyBlock + const CursorShapeSteadyUnderline + type FocusEvent = input.FocusEvent + type FocusInspector interface + FocusedID func() string + type InputErrorMsg struct + Err error + type InspectorKeys struct + Layout string + Messages string + Model string + Panel string + type Key = input.Key + type KeyAction = input.KeyAction + type KeyReleaseMsg struct + Key Key + type KeyRepeatMsg struct + Key Key + type KeyType = input.KeyType + type KeyboardFlags int + const KeyboardDisambiguate + const KeyboardReportAllKeys + const KeyboardReportAlternates + const KeyboardReportEvents + type LayoutInspector interface + InspectLayout func() layout.Node + type Linearizer interface + Linearize func() string + type Model interface + Init func() Cmd + Update func(Msg) (Model, Cmd) + View func() string + type MouseAction = input.MouseAction + type MouseButton = input.MouseButton + type MouseEvent = input.MouseEvent + type MouseMode int + const MouseAllMotion + const MouseCellMotion + const MouseClick + const MouseOff + type Msg any + func RunCmd(ctx context.Context, cmd Cmd) Msg + type Overlay interface + Open func() bool + Render func(base string) string + Update func(Msg) (T, Cmd) + type PaletteColorEvent = input.PaletteColorEvent + type PanicError struct + Stack []byte + Value any + func (e *PanicError) Error() string + type PasteEvent = input.PasteEvent + type Program struct + func NewProgram(m Model, opts ...ProgramOption) *Program + func (p *Program) Accessible() bool + func (p *Program) Capabilities() Capabilities + func (p *Program) CapabilitiesKnown() bool + func (p *Program) Clock() Clock + func (p *Program) ColorProfile() ansi.Profile + func (p *Program) Context() context.Context + func (p *Program) Keymap() *keymap.Registry + func (p *Program) Measurer() ansi.Measurer + func (p *Program) Quit() + func (p *Program) ReducedMotion() bool + func (p *Program) Run() (Model, error) + func (p *Program) Send(msg Msg) + func (p *Program) TrySend(msg Msg) bool + type ProgramOption func(*Program) + func WithAccessible(enabled bool) ProgramOption + func WithAccessibleAuto() ProgramOption + func WithAltScreen(enabled bool) ProgramOption + func WithAnnounceRegion(rows int) ProgramOption + func WithBackgroundDetection(timeout time.Duration) ProgramOption + func WithBidi(enabled bool) ProgramOption + func WithBracketedPaste(enabled bool) ProgramOption + func WithCapabilityProbe(timeout time.Duration) ProgramOption + func WithCellRenderer(enabled bool) ProgramOption + func WithChordTimeout(d time.Duration) ProgramOption + func WithChords(defs ...ChordDef) ProgramOption + func WithClock(c Clock) ProgramOption + func WithColorProfile(p ansi.Profile) ProgramOption + func WithContext(ctx context.Context) ProgramOption + func WithErrOutput(w io.Writer) ProgramOption + func WithEscTimeout(d time.Duration) ProgramOption + func WithExitOnSignal(enabled bool) ProgramOption + func WithFocusReporting(enabled bool) ProgramOption + func WithFrameLog(w io.Writer) ProgramOption + func WithInput(r io.Reader) ProgramOption + func WithInputCloser(c io.Closer) ProgramOption + func WithInspector(keys InspectorKeys) ProgramOption + func WithKeyboard(flags KeyboardFlags) ProgramOption + func WithKittyKeyboard(enabled bool) ProgramOption + func WithLinearizeFullLine() ProgramOption + func WithMaxConcurrentCmds(n int) ProgramOption + func WithMaxFPS(fps int) ProgramOption + func WithMouse(mode MouseMode) ProgramOption + func WithOutput(w io.Writer) ProgramOption + func WithRecorder(w io.Writer) ProgramOption + func WithRecorderSidecar(w io.Writer) ProgramOption + func WithRecover(enabled bool) ProgramOption + func WithReducedMotion(enabled bool) ProgramOption + func WithResizePoll(d time.Duration) ProgramOption + func WithSuspendOnCtrlZ(enabled bool) ProgramOption + func WithTerminal(t Terminal) ProgramOption + func WithTheme(auto theme.Auto) ProgramOption + type QuitMsg struct + type ReplyEvent = input.ReplyEvent + type ResizeMsg struct + Height int + Measurer ansi.Measurer + Width int + type ResizeNotifier interface + Resizes func() <-chan struct{} + type Rewrapper interface + Rewrap func(inner Model) Model + type SuspendMsg struct + Err error + type Terminal interface + EnableOutputVT func() (restore func() error, err error) + IsTerminal func() bool + MakeRaw func(mouse bool) (restore func() error, err error) + Size func() (w, h int, ok bool) + type ThemeSetter interface + SetTheme func(theme.Theme) T + type Themeable interface + SetTheme func(theme.Theme) Model + type Unwrapper interface + Unwrap func() Model