Versions in this module Expand all Collapse all v1 v1.0.0 Jun 11, 2026 Changes in this version + const EllipsisRune + var BorderDouble = BorderStyle + var BorderHidden = BorderStyle + var BorderNone = BorderStyle + var BorderNormal = BorderStyle + var BorderRounded = BorderStyle + var BorderThick = BorderStyle + var ColorBlack = ANSI(0) + var ColorBlackTrue = RGB(0, 0, 0) + var ColorBlue = ANSI(4) + var ColorBrightBlack = ANSI(8) + var ColorBrightBlue = ANSI(12) + var ColorBrightCyan = ANSI(14) + var ColorBrightGreen = ANSI(10) + var ColorBrightRed = ANSI(9) + var ColorBrightWhite = ANSI(15) + var ColorBrightYellow = ANSI(11) + var ColorCyan = ANSI(6) + var ColorGray = RGB(128, 128, 128) + var ColorGreen = ANSI(2) + var ColorMagenta = ANSI(5) + var ColorRed = ANSI(1) + var ColorTransparent = Color + var ColorWhite = ANSI(7) + var ColorWhiteTrue = RGB(255, 255, 255) + var ColorYellow = ANSI(3) + var ErrInterrupted = fmt.Errorf("mofu: program was interrupted") + var ErrProgramKilled = fmt.Errorf("mofu: program was killed") + var ErrProgramPanic = fmt.Errorf("mofu: program experienced a panic") + func AlignLine(text string, width int, align TextAlign) string + func Analogous(c Color, angle float64) (Color, Color) + func AnimateOpacity(animator *Animator, from, to float64, duration time.Duration, ...) uint64 + func AnimateValue(animator *Animator, from, to float64, duration time.Duration, easing EasingFn, ...) uint64 + func CharWrap(text string, maxWidth int) []string + func ComputeLayout(node Node, bounds Rect) + func ContrastRatio(a, b Color) float64 + func DiffProps(old, new map[string]any) map[string]any + func DisableMouse() string + func EaseInBack(t float64) float64 + func EaseInBounce(t float64) float64 + func EaseInCubic(t float64) float64 + func EaseInElastic(t float64) float64 + func EaseInExpo(t float64) float64 + func EaseInOutBounce(t float64) float64 + func EaseInOutCubic(t float64) float64 + func EaseInOutExpo(t float64) float64 + func EaseInOutQuad(t float64) float64 + func EaseInQuad(t float64) float64 + func EaseLinear(t float64) float64 + func EaseOutBack(t float64) float64 + func EaseOutBounce(t float64) float64 + func EaseOutCubic(t float64) float64 + func EaseOutElastic(t float64) float64 + func EaseOutExpo(t float64) float64 + func EaseOutQuad(t float64) float64 + func EnableMouse(mode MouseMode) string + func FormatTable(headers []string, rows [][]string, cols []ColumnAlign) []string + func IsColorBlindSafe(colors []Color) bool + func LayoutSegments(segs []StyledSegment, maxWidth int) [][]StyledSegment + func MeasureSegmentsWidth(segs []StyledSegment) int + func MeasureWidth(text string) int + func MeetsWCAG(fg, bg Color, level string) bool + func PadCenter(text string, width int) string + func PadLeft(text string, width int) string + func PadRight(text string, width int) string + func ParseBasicMouse(data []byte) (bool, int, int, MouseButton, MouseAction) + func ParseSGRMouse(data []byte) (bool, int, int, MouseButton, MouseAction) + func RelativeLuminance(c Color) float64 + func RenderText(text string, width int) string + func ResetAttrs(in AttrMask) string + func Run(model Node) error + func RunWithOpts(model Node, opts ...Option) error + func RuneWidth(r rune) int + func SendMessage(dest, message string) error + func Truncate(text string, maxWidth int, withEllipsis bool) string + func TruncateMiddle(text string, maxWidth int) string + func Width(w int) string + func WithProgramMessageRouter(p *Program) + func WordWrap(text string, maxWidth int) []string + type Align int + const AlignCenter + const AlignLeft + const AlignRight + const AlignStretch + type AnimDirection int + const AnimAlternate + const AnimForward + const AnimReverse + type AnimRepeatMode int + const AnimRepeatForever + const AnimRepeatN + const AnimRepeatNone + type AnimSequenceGroup struct + func AnimSequence(anims ...*Animation) *AnimSequenceGroup + func (g *AnimSequenceGroup) Done() bool + func (g *AnimSequenceGroup) Update(delta time.Duration) + type AnimTransition struct + Enter AnimationSpec + Exit AnimationSpec + Update AnimationSpec + func DefaultAnimTransition() AnimTransition + func SlideAnimTransition() AnimTransition + func (t AnimTransition) Animation(typ AnimTransitionType, from, to float64) *Animation + type AnimTransitionType int + const AnimTransitionEnter + const AnimTransitionExit + const AnimTransitionUpdate + type Animation struct + func NewAnimation(spec AnimationSpec, from, to float64) *Animation + func Stagger(spec AnimationSpec, staggerDelay time.Duration, fromTos []StaggerFromTo) []*Animation + func (a *Animation) Done() bool + func (a *Animation) OnChange(fn func(float64)) + func (a *Animation) Reset() + func (a *Animation) Update(delta time.Duration) float64 + type AnimationGroup struct + func Parallel(anims ...*Animation) *AnimationGroup + func (g *AnimationGroup) Done() bool + func (g *AnimationGroup) Update(delta time.Duration) + type AnimationSpec struct + AnimDir AnimDirection + Delay time.Duration + Duration time.Duration + Easing EasingFn + Repeat AnimRepeatMode + RepeatN int + func DefaultAnimationSpec() AnimationSpec + func QuickSpec(duration time.Duration, easing EasingFn) AnimationSpec + type Animator struct + func NewAnimator() *Animator + func (a *Animator) AddSpring(s *Spring) uint64 + func (a *Animator) AddTween(from, to float64, durationMs uint64, easing EasingFn, apply func(v float64)) uint64 + func (a *Animator) CurrentValue(id uint64) (float64, bool) + func (a *Animator) Remove(id uint64) + func (a *Animator) Update(deltaMs uint64) []uint64 + type AttrMask uint16 + const AttrBold + const AttrDim + const AttrDoubleUnderline + const AttrHidden + const AttrItalic + const AttrOverline + const AttrRapidBlink + const AttrReverse + const AttrSlowBlink + const AttrStrikethrough + const AttrUnderline + func (a AttrMask) Has(flag AttrMask) bool + type Attrs struct + Bold bool + Italic bool + Underline bool + type BaseNode struct + func (n *BaseNode) AddChild(child Node) + func (n *BaseNode) Bounds() Rect + func (n *BaseNode) Children() []Node + func (n *BaseNode) Dirty() bool + func (n *BaseNode) HandleEvent(event Event) Cmd + func (n *BaseNode) Mount() Cmd + func (n *BaseNode) RemoveChild(child Node) + func (n *BaseNode) Render(ctx *RenderContext) + func (n *BaseNode) SetBounds(r Rect) + func (n *BaseNode) SetDirty() + func (n *BaseNode) Style() *Style + func (n *BaseNode) Unmount() + type BatchCoalescer struct + func NewBatchCoalescer[T any](signal *Signal[T], interval time.Duration) *BatchCoalescer[T] + func (b *BatchCoalescer[T]) Add(value T) + type BatchMsg []Cmd + type BorderStyle struct + Bottom rune + BottomLeft rune + BottomRight rune + Left rune + Right rune + Top rune + TopLeft rune + TopRight rune + type BoxNode struct + func NewBox(children ...Node) *BoxNode + func (n *BoxNode) HandleEvent(event Event) Cmd + func (n *BoxNode) Mount() Cmd + func (n *BoxNode) Render(ctx *RenderContext) + func (n *BoxNode) Unmount() + type Breakpoint struct + Layout *LayoutNode + MinWidth int + type CapabilityProfile struct + ANSI16 bool + ANSI256 bool + AltScreen bool + BracketedPaste bool + Height int + KittyKeyboard bool + Mouse bool + MouseSGR bool + SyncOutput bool + Terminal string + TrueColor bool + Unicode bool + Width int + func DetectCapabilities() CapabilityProfile + func (p CapabilityProfile) ColorDepth() int + func (p CapabilityProfile) SupportsSGRMouse() bool + func (p CapabilityProfile) SupportsSyncOutput() bool + type ClearScreenMsg struct + type Cmd func() Msg + var NoCmd Cmd = nil + func Batch(cmds ...Cmd) Cmd + func Every(duration time.Duration, fn func(time.Time) Msg) Cmd + func QuitCmd() Cmd + func SendCmd(msg Msg) Cmd + func Sequence(cmds ...Cmd) Cmd + func Tick(delay time.Duration, fn func() Msg) Cmd + type Color struct + ANSICode uint8 + B uint8 + G uint8 + IsANSI bool + R uint8 + func ANSI(code uint8) Color + func BlendColors(a, b Color, t float64) Color + func Complementary(c Color) Color + func Darken(c Color, amount float64) Color + func HSVToRGB(hsv HSV) Color + func Hex(hex string) Color + func Lighten(c Color, amount float64) Color + func RGB(r, g, b uint8) Color + func TextColorForBackground(bg Color) Color + type ColorProfile struct + ANSI256 Color + ANSI4Bit Color + TrueColor Color + type ColorProfileMsg struct + Profile string + type ColumnAlign struct + Align TextAlign + Width int + type Computed struct + func NewComputed[T any](compute func() T, signals ...any) *Computed[T] + func (c *Computed[T]) Get() T + func (c *Computed[T]) Subscribe(fn func(T)) func() + type DataCallback func(oldVal, newVal any) + type DataNode struct + ID string + Source string + Updated time.Time + Value any + Version int64 + func NewDataNode(id string, val any) *DataNode + func (dn *DataNode) Get() any + func (dn *DataNode) Set(val any) + func (dn *DataNode) Subscribe(id string, fn DataCallback) + func (dn *DataNode) SubscribePattern(id uint64, pattern SubscribePattern) + func (dn *DataNode) Unsubscribe(id string, fn DataCallback) + func (dn *DataNode) UnsubscribePattern(id uint64) + type DataStore struct + func NewDataStore() *DataStore + func (s *DataStore) Get(key string) any + func (s *DataStore) Restore(snap map[string]any) + func (s *DataStore) Set(key string, value any) + func (s *DataStore) Snapshot() map[string]any + func (s *DataStore) Subscribe(key string, fn func(any)) func() + func (s *DataStore) Version() uint64 + type DiffResult struct + Changes map[string]any + Node *TreeNode + Old *TreeNode + Type string + func DiffTrees(old, new *TreeNode) []DiffResult + type Direction int + const DirectionColumn + const DirectionRow + type EasingFn func(t float64) float64 + type Effect interface + Cancel func() + Done func() <-chan struct{} + Execute func() Msg + ID func() string + func NewEffect(name string, fn func() Msg) Effect + func NewRetryEffect(name string, maxRetries int, fn func() (Msg, error)) Effect + func NewTimerEffect(name string, delay time.Duration, fn func() Msg) Effect + type EffectRunner struct + func NewEffectRunner(fn func()) *EffectRunner + func (e *EffectRunner) OnCleanup(fn func()) + func (e *EffectRunner) Run() + func (e *EffectRunner) Stop() + type EnvMsg map[string]string + type Event struct + Data Msg + Source string + Time time.Time + Type EventType + type EventBus struct + func NewEventBus() *EventBus + func (eb *EventBus) Publish(event Event) + func (eb *EventBus) Subscribe(event string, handler EventHandler) + func (eb *EventBus) Unsubscribe(event string) + type EventHandler func(Event) + type EventType int + const EventAnimation + const EventCustom + const EventData + const EventKeyPress + const EventMouse + const EventResize + const EventSystem + type FrameStats struct + DirtyCells int + FPS float64 + FrameCount int64 + RenderTime time.Duration + TotalCells int + type HSV struct + H float64 + S float64 + V float64 + func RGBToHSV(c Color) HSV + type History struct + func NewHistory[T any](maxSize int) *History[T] + func (h *History[T]) CanRedo() bool + func (h *History[T]) CanUndo() bool + func (h *History[T]) Clear() + func (h *History[T]) Push(state T) + func (h *History[T]) Redo() (T, bool) + func (h *History[T]) Undo() (T, bool) + type InterruptMsg struct + type Justify int + const JustifyCenter + const JustifyEnd + const JustifySpaceBetween + const JustifyStart + type Key int + const KeyBack + const KeyCtrlA + const KeyCtrlAt + const KeyCtrlB + const KeyCtrlBackslash + const KeyCtrlC + const KeyCtrlCaret + const KeyCtrlCloseBracket + const KeyCtrlD + const KeyCtrlE + const KeyCtrlF + const KeyCtrlG + const KeyCtrlJ + const KeyCtrlK + const KeyCtrlL + const KeyCtrlN + const KeyCtrlO + const KeyCtrlP + const KeyCtrlQ + const KeyCtrlR + const KeyCtrlS + const KeyCtrlT + const KeyCtrlU + const KeyCtrlUnderscore + const KeyCtrlV + const KeyCtrlW + const KeyCtrlX + const KeyCtrlY + const KeyCtrlZ + const KeyDelete + const KeyDown + const KeyEnd + const KeyEnter + const KeyEsc + const KeyF1 + const KeyF10 + const KeyF11 + const KeyF12 + const KeyF2 + const KeyF3 + const KeyF4 + const KeyF5 + const KeyF6 + const KeyF7 + const KeyF8 + const KeyF9 + const KeyHome + const KeyInsert + const KeyLeft + const KeyNone + const KeyPgDn + const KeyPgUp + const KeyRight + const KeyShiftTab + const KeySpace + const KeyTab + const KeyUp + type KeyEvent struct + Alt bool + Ctrl bool + Key Key + Runes []byte + Shift bool + type KickstartMsg struct + type LayoutEngine struct + func NewLayoutEngine(width, height int) *LayoutEngine + func (le *LayoutEngine) Compute() + func (le *LayoutEngine) GetBounds(node *LayoutNode) Rect + func (le *LayoutEngine) Invalidate() + func (le *LayoutEngine) IsDirty() bool + func (le *LayoutEngine) Resize(width, height int) + func (le *LayoutEngine) SetRoot(root *LayoutNode) + type LayoutNode struct + Bounds Rect + Children []*LayoutNode + Fixed bool + Grow float64 + MaxHeight int + MaxWidth int + MinHeight int + MinWidth int + Shrink float64 + func FixedNode(width, height int) *LayoutNode + func FlexColumn(children []*LayoutNode, gap int) *LayoutNode + func FlexRow(children []*LayoutNode, gap int) *LayoutNode + func NewGrowNode(grow float64) *LayoutNode + type MessageRouter struct + func NewMessageRouter(dispatch func(RoutedEvent)) *MessageRouter + func (r *MessageRouter) SetDispatch(dispatch func(RoutedEvent)) + type Middleware func(SessionHandler) SessionHandler + func AuthMiddleware(callback func(sess *SSHSession) bool) Middleware + func LoggingMiddleware(logger *log.Logger) Middleware + func RateLimitMiddleware(maxConcurrent int) Middleware + type Minimal struct + func (m *Minimal) AddChild(child Node) + func (m *Minimal) Bounds() Rect + func (m *Minimal) Children() []Node + func (m *Minimal) Dirty() bool + func (m *Minimal) Mount() Cmd + func (m *Minimal) RemoveChild(child Node) + func (m *Minimal) SetBounds(r Rect) + func (m *Minimal) SetDirty() + func (m *Minimal) Style() *Style + func (m *Minimal) Unmount() + type Model = Node + type MouseAction int + const MouseDrag + const MouseMove + const MousePress + const MouseRelease + type MouseButton int + const MouseLeft + const MouseMiddle + const MouseNone + const MouseRight + const MouseWheelDown + const MouseWheelUp + type MouseEvent struct + Action MouseAction + Button MouseButton + X int + Y int + type MouseMode int + const MouseBasic + const MouseOff + const MouseSGRMode + type MouseState struct + Button MouseButton + Pressed bool + X int + Y int + type Msg any + func ClearScreen() Msg + func Interrupt() Msg + func Quit() Msg + func Raw(content any) Msg + type Node interface + AddChild func(child Node) + Bounds func() Rect + Children func() []Node + Dirty func() bool + HandleEvent func(event Event) Cmd + Mount func() Cmd + RemoveChild func(child Node) + Render func(ctx *RenderContext) + SetBounds func(Rect) + SetDirty func() + Style func() *Style + Unmount func() + type Option func(*Program) + func WithBackspace() Option + func WithFPS(fps int) Option + func WithHardTabs() Option + func WithInput(r io.Reader) Option + func WithInputEnabled(enabled bool) Option + func WithOutputWriter(w io.Writer) Option + func WithSize(w, h int) Option + func WithTheme(t *Theme) Option + func WithoutCatchPanics() Option + func WithoutRenderer() Option + func WithoutSignalHandler() Option + type OverlayNode struct + func NewOverlay(children ...Node) *OverlayNode + func (n *OverlayNode) HandleEvent(event Event) Cmd + func (n *OverlayNode) Mount() Cmd + func (n *OverlayNode) Render(ctx *RenderContext) + func (n *OverlayNode) Unmount() + type Program struct + func New(root Node, opts ...Option) *Program + func (p *Program) DataStore() *DataStore + func (p *Program) Dirty() bool + func (p *Program) EventBus() *EventBus + func (p *Program) Height() int + func (p *Program) Kernel() *kernel.Kernel + func (p *Program) Kill() + func (p *Program) Model() Model + func (p *Program) Renderer() *Renderer + func (p *Program) Run() error + func (p *Program) Send(msg Msg) + func (p *Program) SetDirty() + func (p *Program) Theme() *Theme + func (p *Program) Wait() + func (p *Program) Width() int + type QuitMsg struct + type RawMsg struct + Content any + type Rect struct + Height int + Width int + X int + Y int + func (r Rect) Contains(x, y int) bool + type RenderContext struct + Bounds Rect + Delta time.Duration + Frame int64 + Renderer *Renderer + Theme *Theme + type Renderer struct + func NewRenderer(w, h int, theme *Theme) *Renderer + func (r *Renderer) Clear() + func (r *Renderer) Flush() string + func (r *Renderer) Resize(w, h int) + func (r *Renderer) WriteString(text string, x, y int, fg, bg Color, attrs AttrMask) + func (r *Renderer) WriteStyledString(text string, x, y int, style Style) + type ResponsiveLayout struct + func NewResponsiveLayout() *ResponsiveLayout + func (rl *ResponsiveLayout) AddBreakpoint(minWidth int, layout *LayoutNode) + func (rl *ResponsiveLayout) GetLayout(width int) *LayoutNode + func (rl *ResponsiveLayout) SetDefault(layout *LayoutNode) + type ResumeMsg struct + type RichParser struct + func (rp *RichParser) ApplyTag(tag string, style *Style) + func (rp *RichParser) Parse(input string) []StyledSegment + type RoutedEvent struct + Dest string + Msg Msg + Source string + type Runtime struct + Config RuntimeConfig + ID string + Mounted bool + State string + Type string + UpdateHook func() + func NewRuntime(id, typ string, cfg RuntimeConfig) *Runtime + func (r *Runtime) DirtyRectangles() []Rect + func (r *Runtime) Mount() + func (r *Runtime) RequestRender() + func (r *Runtime) Update(state string) + type RuntimeConfig struct + Source string + Thread string + Type string + type SSHServer struct + func NewSSHServer(cfg SSHServerConfig) (*SSHServer, error) + func (s *SSHServer) Close() error + func (s *SSHServer) Serve(addr string) error + func (s *SSHServer) Sessions() int64 + type SSHServerConfig struct + Addr string + HostKey []byte + Middlewares []Middleware + NewProgram func(*SSHSession) *Program + type SSHSession struct + IsPty bool + func (s *SSHSession) Close() error + func (s *SSHSession) RemoteAddr() string + type SceneBuffer struct + Cells [][]SceneCell + Height int + Width int + func NewSceneBuffer(w, h int) *SceneBuffer + func (sb *SceneBuffer) CellWidth(ch rune) int + func (sb *SceneBuffer) Clear() + func (sb *SceneBuffer) Set(x, y int, char rune, fg, bg Color, attrs AttrMask) + type SceneCell struct + Attrs AttrMask + Bg Color + Char rune + Dirty bool + Fg Color + Width int + type ScrollNode struct + func NewScroll(child Node) *ScrollNode + func (n *ScrollNode) Children() []Node + func (n *ScrollNode) HandleEvent(event Event) Cmd + func (n *ScrollNode) Mount() Cmd + func (n *ScrollNode) Render(ctx *RenderContext) + func (n *ScrollNode) ScrollBy(dx, dy int) + func (n *ScrollNode) ScrollTo(x, y int) + func (n *ScrollNode) Unmount() + type SemanticColor int + const SemanticAccent + const SemanticError + const SemanticInfo + const SemanticMuted + const SemanticNone + const SemanticPrimary + const SemanticSecondary + const SemanticSuccess + const SemanticWarning + type SemanticColors struct + BorderDefault Color + BorderError Color + BorderFocused Color + Shadow Color + TextDisabled Color + TextPrimary Color + TextSecondary Color + type SequenceMsg []Cmd + type SessionHandler func(sess *SSHSession) + type Signal struct + func NewSignal[T any](initial T) *Signal[T] + func (s *Signal[T]) Get() T + func (s *Signal[T]) Set(value T) + func (s *Signal[T]) Subscribe(fn func(T)) func() + func (s *Signal[T]) Version() uint64 + type Spacing struct + Bottom int + Left int + Right int + Top int + func SpacingTokenAll(t SpacingToken) Spacing + type SpacingScale struct + Scale []int + X0 int + X1 int + X12 int + X16 int + X2 int + X4 int + X8 int + type SpacingToken int + const SpacingL + const SpacingM + const SpacingNone + const SpacingS + const SpacingXL + const SpacingXS + const SpacingXXL + const SpacingXXS + func (t SpacingToken) Value() int + type Spring struct + Current float64 + Damping float64 + Mass float64 + Stiffness float64 + Target float64 + Velocity float64 + func AnimatePosition(current, target float64) *Spring + func NewSpring(current float64) *Spring + func (s *Spring) Advance(deltaMs uint64) + func (s *Spring) IsAtRest() bool + func (s *Spring) SetTarget(t float64) + type SpringEntry struct + Spring *Spring + type StackNode struct + func NewColumn(children ...Node) *StackNode + func NewRow(children ...Node) *StackNode + func (n *StackNode) HandleEvent(event Event) Cmd + func (n *StackNode) Mount() Cmd + func (n *StackNode) Render(ctx *RenderContext) + func (n *StackNode) Unmount() + type StaggerFromTo struct + From float64 + To float64 + type State int + const StateDone + const StateError + const StateInit + const StatePaused + const StateReady + const StateRunning + const StateStopping + func ProgramState(p *Program) State + func (s State) String() string + type StateChangeListener func(path string, oldVal, newVal any) + type StateGraph struct + func NewStateGraph() *StateGraph + func (sg *StateGraph) DirtyPaths(sinceVersion uint64) []string + func (sg *StateGraph) Get(path string) (any, bool) + func (sg *StateGraph) GetNode(path string) *DataNode + func (sg *StateGraph) Restore(snap map[string]any) + func (sg *StateGraph) Set(path string, val any) bool + func (sg *StateGraph) Snapshot() map[string]any + func (sg *StateGraph) SubscribePath(pattern SubscribePattern, fn StateChangeListener) uint64 + func (sg *StateGraph) Unsubscribe(id uint64) + func (sg *StateGraph) Version() uint64 + type StateMachine struct + func (sm *StateMachine) History() []Transition + func (sm *StateMachine) OnChange(fn func(from, to State)) + func (sm *StateMachine) State() State + func (sm *StateMachine) TransitionTo(to State) bool + type Stream struct + func NewStream[T any](name string, buffer int) *Stream[T] + func (s *Stream[T]) Backlog() int32 + func (s *Stream[T]) Close() + func (s *Stream[T]) Done() <-chan struct{} + func (s *Stream[T]) Name() string + func (s *Stream[T]) Receive() (T, bool) + func (s *Stream[T]) Send(value T) bool + type Style struct + Align Align + Attrs AttrMask + Background Color + Border BorderStyle + Direction Direction + Foreground Color + Gap int + Grow float64 + Gutter int + Height int + Margin Spacing + MaxHeight int + MaxWidth int + MinHeight int + MinWidth int + OffsetX int + OffsetY int + Opacity float64 + Padding Spacing + Shrink float64 + Width int + func DefaultStyle() Style + func SemanticBg(sc SemanticColor, theme *Theme) Style + func SemanticFg(sc SemanticColor, theme *Theme) Style + func (s Style) Apply(text string) string + func (s Style) Bg(c Color) Style + func (s Style) Fg(c Color) Style + func (s Style) MarginAll(v int) Style + func (s Style) PaddingAll(v int) Style + func (s Style) Reset() string + func (s Style) SGR() string + func (s Style) WithAttrs(flags AttrMask) Style + func (s Style) WithBorder(bs BorderStyle) Style + type StyledChar struct + Ch rune + Style Style + Width int + type StyledSegment struct + Style Style + Text string + func ParseRichText(input string) []StyledSegment + type SubscribePattern struct + Contains string + Exact string + Prefix string + Suffix string + func (p SubscribePattern) Matches(id string) bool + func (p SubscribePattern) String() string + type SuspendMsg struct + type TextAlign uint8 + const TextAlignCenter + const TextAlignJustify + const TextAlignLeft + const TextAlignRight + type TextLayout struct + Height int + LineWidths []int + Lines []string + Width int + func LayoutText(text string, cfg TextRendererConfig, align TextAlign) TextLayout + type TextNode struct + Content string + func NewText(content string) *TextNode + func (n *TextNode) Render(ctx *RenderContext) + type TextRendererConfig struct + Ellipsis bool + TabWidth int + WordWrap bool + WrapWidth int + func DefaultTextRendererConfig() TextRendererConfig + type Theme struct + Border BorderStyle + Colors ThemeColors + Name string + Radius int + Semantic SemanticColors + Spacing SpacingScale + Typography Typography + Version string + Widgets WidgetThemes + func CatppuccinMocha() *Theme + func DefaultTheme() *Theme + func MochiTheme() *Theme + type ThemeColors struct + Accent Color + Background Color + Border Color + Error Color + Info Color + Muted Color + Neutral []Color + Primary Color + Secondary Color + Success Color + Surface Color + Text Color + TextDim Color + Warning Color + type ThemeManager struct + func NewThemeManager(initial *Theme) *ThemeManager + func (tm *ThemeManager) Apply(name string) bool + func (tm *ThemeManager) Current() *Theme + func (tm *ThemeManager) LoadFile(path string) error + func (tm *ThemeManager) Names() []string + func (tm *ThemeManager) OnChange(fn func(old, new *Theme)) + func (tm *ThemeManager) Register(name string, theme *Theme) + type Transition struct + From State + To State + func (t Transition) String() string + func (t Transition) Valid() bool + type TreeNode struct + Bounds Rect + Children []*TreeNode + Dirty bool + Focused bool + ID string + Parent *TreeNode + Props map[string]any + Style *Style + Type string + Visible bool + func NewTreeNode(id, nodeType string) *TreeNode + func (n *TreeNode) AddChild(child *TreeNode) + func (n *TreeNode) Emit(event Event) + func (n *TreeNode) Find(id string) *TreeNode + func (n *TreeNode) FindByType(nodeType string) []*TreeNode + func (n *TreeNode) GetProp(key string) any + func (n *TreeNode) On(event string, handler func(Event)) + func (n *TreeNode) RemoveChild(id string) + func (n *TreeNode) SetProp(key string, value any) + type TreeRenderer struct + func NewTreeRenderer(root *TreeNode, renderer *Renderer, theme *Theme) *TreeRenderer + func (tr *TreeRenderer) FindNode(id string) *TreeNode + func (tr *TreeRenderer) Render(bounds Rect) + func (tr *TreeRenderer) Root() *TreeNode + func (tr *TreeRenderer) UpdateTree(newRoot *TreeNode) + type TweenEntry struct + Apply func(v float64) + DurationMs uint64 + Easing EasingFn + ElapsedMs uint64 + From float64 + To float64 + type Typography struct + Body Style + Label Style + Mono Style + Subtitle Style + Title Style + type Vec2 struct + X float64 + Y float64 + func Vec2XY(x, y float64) Vec2 + type WidgetTheme struct + Disabled Style + Error Style + Focused Style + Hover Style + Normal Style + Pressed Style + type WidgetThemes struct + Button WidgetTheme + Checkbox WidgetTheme + Input WidgetTheme + List WidgetTheme + Progress WidgetTheme + Radio WidgetTheme + Scrollbar WidgetTheme + type WindowSizeMsg struct + Height int + Width int