Versions in this module Expand all Collapse all v0 v0.1.12 Jan 14, 2026 Changes in this version + var Bounce = AnimationConfig + var FadeIn = AnimationConfig + var FadeOut = AnimationConfig + var Pulse = AnimationConfig + var SlideIn = AnimationConfig + var SlideOut = AnimationConfig + var Smooth = AnimationConfig + var Snap = AnimationConfig + var Spinner = AnimationConfig + var Spring = AnimationConfig + var TransitionPresets = map[string]AnimationConfig + func GetMousePosition(msg tea.MouseMsg) (x, y int) + func IsInBounds(mouseX, mouseY int, rect layout.Rectangle) bool + func IsInBoundsXY(mouseX, mouseY, x, y, width, height int) bool + func IsLeftClick(msg tea.MouseMsg) bool + func IsLeftRelease(msg tea.MouseMsg) bool + func IsMiddleClick(msg tea.MouseMsg) bool + func IsMouseMotion(msg tea.MouseMsg) bool + func IsRightClick(msg tea.MouseMsg) bool + func IsScrollDown(msg tea.MouseMsg) bool + func IsScrollUp(msg tea.MouseMsg) bool + type Animatable interface + IsAnimating func() bool + StartAnimation func() tea.Cmd + StopAnimation func() + UpdateAnimation func(tick int) + type AnimatedComponent struct + func BounceComponent(c Component) *AnimatedComponent + func FadeInComponent(c Component) *AnimatedComponent + func FadeOutComponent(c Component) *AnimatedComponent + func NewAnimatedComponent(component Component, config AnimationConfig) *AnimatedComponent + func NewAnimatedComponentWithID(id string, component Component, config AnimationConfig) *AnimatedComponent + func PulseComponent(c Component) *AnimatedComponent + func SlideInComponent(c Component, from, to float64) *AnimatedComponent + func SlideOutComponent(c Component, from, to float64) *AnimatedComponent + func SmoothComponent(c Component) *AnimatedComponent + func SnapComponent(c Component) *AnimatedComponent + func SpinnerComponent(c Component) *AnimatedComponent + func SpringComponent(c Component) *AnimatedComponent + func (a *AnimatedComponent) Component() Component + func (a *AnimatedComponent) GetID() string + func (a *AnimatedComponent) GetValue() float64 + func (a *AnimatedComponent) Init() tea.Cmd + func (a *AnimatedComponent) IsAnimating() bool + func (a *AnimatedComponent) Progress() float64 + func (a *AnimatedComponent) Reset() + func (a *AnimatedComponent) SetValue(value float64) + func (a *AnimatedComponent) StartAnimation(from, to float64) tea.Cmd + func (a *AnimatedComponent) StopAnimation() tea.Cmd + func (a *AnimatedComponent) Update(msg tea.Msg) (Component, tea.Cmd) + func (a *AnimatedComponent) View() string + type AnimatedProgress struct + func NewAnimatedProgress(width int, label string) *AnimatedProgress + func (p *AnimatedProgress) Init() tea.Cmd + func (p *AnimatedProgress) SetProgress(target float64) tea.Cmd + func (p *AnimatedProgress) Update(msg tea.Msg) (Component, tea.Cmd) + func (p *AnimatedProgress) View() string + type AnimatedPulse struct + func NewAnimatedPulse(text string, color lipgloss.Color) *AnimatedPulse + func (p *AnimatedPulse) Init() tea.Cmd + func (p *AnimatedPulse) Start() tea.Cmd + func (p *AnimatedPulse) Update(msg tea.Msg) (Component, tea.Cmd) + func (p *AnimatedPulse) View() string + type AnimatedRotation struct + func NewAnimatedRotation(radius float64, char string) *AnimatedRotation + func (r *AnimatedRotation) Init() tea.Cmd + func (r *AnimatedRotation) Start() tea.Cmd + func (r *AnimatedRotation) Update(msg tea.Msg) (Component, tea.Cmd) + func (r *AnimatedRotation) View() string + type AnimatedSlide struct + func NewAnimatedSlide(content string, width int) *AnimatedSlide + func (s *AnimatedSlide) Init() tea.Cmd + func (s *AnimatedSlide) SlideIn() tea.Cmd + func (s *AnimatedSlide) SlideOut() tea.Cmd + func (s *AnimatedSlide) Update(msg tea.Msg) (Component, tea.Cmd) + func (s *AnimatedSlide) View() string + type AnimatedSpinner struct + func NewAnimatedSpinner(message string) *AnimatedSpinner + func (s *AnimatedSpinner) Init() tea.Cmd + func (s *AnimatedSpinner) Start() tea.Cmd + func (s *AnimatedSpinner) Stop() tea.Cmd + func (s *AnimatedSpinner) Update(msg tea.Msg) (Component, tea.Cmd) + func (s *AnimatedSpinner) View() string + type AnimationCompleteMsg struct + ID string + Value float64 + type AnimationConfig struct + AngularFrequency float64 + DampingRatio float64 + Duration time.Duration + FPS int + Loop bool + Reverse bool + func CustomTransition(duration time.Duration, fps int, angularFreq, dampingRatio float64, ...) AnimationConfig + func DefaultAnimationConfig() AnimationConfig + func GetTransitionPreset(name string) (AnimationConfig, bool) + func MediumTransition() AnimationConfig + func QuickTransition() AnimationConfig + func RotationAnimation(duration time.Duration, loop bool) AnimationConfig + func SlowTransition() AnimationConfig + type AnimationTickMsg struct + ID string + Time time.Time + Value float64 + type ClickDetector struct + func NewClickDetector(bounds layout.Rectangle, onClick, onDoubleClick MouseEventHandler) *ClickDetector + func (cd *ClickDetector) HandleClick(msg tea.MouseMsg) tea.Cmd + func (cd *ClickDetector) SetBounds(bounds layout.Rectangle) + type Cloneable interface + Clone func() Component + type ColumnAlignment int + const ColumnAlignBottom + const ColumnAlignCenter + const ColumnAlignStretch + const ColumnAlignTop + func (ca ColumnAlignment) String() string + type Component interface + Init func() tea.Cmd + Update func(msg tea.Msg) (Component, tea.Cmd) + View func() string + type ComponentAdapter struct + func NewComponentAdapter() *ComponentAdapter + func (c *ComponentAdapter) Blur() + func (c *ComponentAdapter) Focus() tea.Cmd + func (c *ComponentAdapter) Focused() bool + func (c *ComponentAdapter) GetLifecycleState() LifecycleState + func (c *ComponentAdapter) GetSize() (width, height int) + func (c *ComponentAdapter) Hide() + func (c *ComponentAdapter) Init() tea.Cmd + func (c *ComponentAdapter) IsInitialized() bool + func (c *ComponentAdapter) IsMounted() bool + func (c *ComponentAdapter) IsVisible() bool + func (c *ComponentAdapter) OnAfterUpdate(msg tea.Msg) tea.Cmd + func (c *ComponentAdapter) OnBeforeUpdate(msg tea.Msg) bool + func (c *ComponentAdapter) OnBlur() tea.Cmd + func (c *ComponentAdapter) OnFocus() tea.Cmd + func (c *ComponentAdapter) OnHide() tea.Cmd + func (c *ComponentAdapter) OnInit() tea.Cmd + func (c *ComponentAdapter) OnMount() tea.Cmd + func (c *ComponentAdapter) OnResize(width, height int) tea.Cmd + func (c *ComponentAdapter) OnShow() tea.Cmd + func (c *ComponentAdapter) OnUnmount() tea.Cmd + func (c *ComponentAdapter) SetSize(width, height int) + func (c *ComponentAdapter) Show() + func (c *ComponentAdapter) Toggle() + func (c *ComponentAdapter) Update(msg tea.Msg) (Component, tea.Cmd) + func (c *ComponentAdapter) View() string + type Configurable interface + GetConfig func() interface{} + SetConfig func(config interface{}) error + type ConfirmationPopup interface + Cancel func() tea.Cmd + Confirm func() tea.Cmd + GetButtons func() []string + GetDefaultButton func() int + GetMessage func() string + GetSelectedButton func() int + SetButtons func(buttons []string) + SetDefaultButton func(index int) + SetMessage func(message string) + type Disposable interface + Dispose func() error + IsDisposed func() bool + type DragHandler struct + CurrentX int + CurrentY int + IsActive bool + OnDrag MouseEventHandler + OnDragEnd MouseEventHandler + OnDragStart MouseEventHandler + StartX int + StartY int + func NewDragHandler(onStart, onDrag, onEnd MouseEventHandler) *DragHandler + func (dh *DragHandler) DragDelta() (dx, dy int) + func (dh *DragHandler) HandleMouseMsg(msg tea.MouseMsg) tea.Cmd + func (dh *DragHandler) Reset() + type DraggableComponent struct + func NewDraggable(component Component, x, y int) *DraggableComponent + func (d *DraggableComponent) Blur() + func (d *DraggableComponent) DisableSnapToGrid() + func (d *DraggableComponent) EnableSnapToGrid(size int) + func (d *DraggableComponent) EndDrag() + func (d *DraggableComponent) Focus() tea.Cmd + func (d *DraggableComponent) Focused() bool + func (d *DraggableComponent) GetComponent() Component + func (d *DraggableComponent) GetSize() (width, height int) + func (d *DraggableComponent) Init() tea.Cmd + func (d *DraggableComponent) IsDragging() bool + func (d *DraggableComponent) Position() (x, y int) + func (d *DraggableComponent) SetBorderStyle(style lipgloss.Style) + func (d *DraggableComponent) SetBounds(x, y, width, height int) + func (d *DraggableComponent) SetComponent(component Component) + func (d *DraggableComponent) SetDragHandle(x, y, width, height int) + func (d *DraggableComponent) SetDragStyle(style lipgloss.Style) + func (d *DraggableComponent) SetPosition(x, y int) + func (d *DraggableComponent) SetSize(width, height int) + func (d *DraggableComponent) StartDrag(mouseX, mouseY int) + func (d *DraggableComponent) Update(msg tea.Msg) (Component, tea.Cmd) + func (d *DraggableComponent) UpdateDrag(mouseX, mouseY int) + func (d *DraggableComponent) View() string + type Eventable interface + Emit func(eventType string, data interface{}) + Off func(eventType string) + On func(eventType string, handler func(interface{})) + type FilterablePopup interface + ClearFilter func() + GetFilter func() string + IsFiltered func() bool + SetFilter func(filter string) + type Focusable interface + Blur func() + Focus func() tea.Cmd + Focused func() bool + type HoverDetector struct + func NewHoverDetector(bounds layout.Rectangle, onEnter, onLeave, onHover MouseEventHandler) *HoverDetector + func (hd *HoverDetector) IsHovering() bool + func (hd *HoverDetector) SetBounds(bounds layout.Rectangle) + func (hd *HoverDetector) Update(msg tea.MouseMsg) tea.Cmd + type Initializable interface + GetInitError func() error + Initialize func() tea.Cmd + IsInitialized func() bool + type Lifecycle interface + GetLifecycleState func() LifecycleState + IsInitialized func() bool + IsMounted func() bool + OnAfterUpdate func(msg tea.Msg) tea.Cmd + OnBeforeUpdate func(msg tea.Msg) bool + OnBlur func() tea.Cmd + OnFocus func() tea.Cmd + OnHide func() tea.Cmd + OnInit func() tea.Cmd + OnMount func() tea.Cmd + OnResize func(width, height int) tea.Cmd + OnShow func() tea.Cmd + OnUnmount func() tea.Cmd + type LifecycleEvent struct + Component string + Data interface{} + Timestamp int64 + Type LifecycleEventType + type LifecycleEventBus interface + Clear func() + GetObserverCount func() int + Publish func(event LifecycleEvent) + Subscribe func(observer LifecycleObserver) + Unsubscribe func(observer LifecycleObserver) + type LifecycleEventType int + const EventBlur + const EventDispose + const EventError + const EventFocus + const EventHide + const EventInit + const EventMount + const EventResize + const EventShow + const EventUnmount + const EventUpdate + func (e LifecycleEventType) String() string + type LifecycleHooks struct + OnAfterUpdateFunc func(msg tea.Msg) tea.Cmd + OnBeforeUpdateFunc func(msg tea.Msg) bool + OnBlurFunc func() tea.Cmd + OnFocusFunc func() tea.Cmd + OnHideFunc func() tea.Cmd + OnInitFunc func() tea.Cmd + OnMountFunc func() tea.Cmd + OnResizeFunc func(width, height int) tea.Cmd + OnShowFunc func() tea.Cmd + OnUnmountFunc func() tea.Cmd + func (h *LifecycleHooks) ExecuteAfterUpdate(msg tea.Msg) tea.Cmd + func (h *LifecycleHooks) ExecuteBeforeUpdate(msg tea.Msg) bool + func (h *LifecycleHooks) ExecuteBlur() tea.Cmd + func (h *LifecycleHooks) ExecuteFocus() tea.Cmd + func (h *LifecycleHooks) ExecuteHide() tea.Cmd + func (h *LifecycleHooks) ExecuteInit() tea.Cmd + func (h *LifecycleHooks) ExecuteMount() tea.Cmd + func (h *LifecycleHooks) ExecuteResize(width, height int) tea.Cmd + func (h *LifecycleHooks) ExecuteShow() tea.Cmd + func (h *LifecycleHooks) ExecuteUnmount() tea.Cmd + type LifecycleManager interface + GetComponent func(name string) (Lifecycle, error) + GetRegisteredComponents func() []string + HasComponent func(name string) bool + InitializeAll func() []tea.Cmd + MountAll func() []tea.Cmd + RegisterComponent func(name string, component Lifecycle) error + UnmountAll func() []tea.Cmd + UnregisterComponent func(name string) error + type LifecycleObserver interface + OnLifecycleEvent func(event LifecycleEvent) + type LifecycleState int + const StateDisposed + const StateError + const StateInitialized + const StateInitializing + const StateMounted + const StateMounting + const StateUninitialized + const StateUnmounted + const StateUnmounting + const StateUpdating + func (s LifecycleState) String() string + type Mountable interface + IsMounted func() bool + Mount func() tea.Cmd + Unmount func() tea.Cmd + type MouseEventHandler func(msg tea.MouseMsg) tea.Cmd + type MouseState struct + Button int + DragStartX int + DragStartY int + IsDragging bool + IsPressed bool + X int + Y int + func NewMouseState() *MouseState + func (ms *MouseState) DragDistance() (dx, dy int) + func (ms *MouseState) Update(msg tea.MouseMsg) + type MultiColumnLayout struct + func NewMultiColumnLayout(columns []Component) *MultiColumnLayout + func (mcl *MultiColumnLayout) AddColumn(component Component) + func (mcl *MultiColumnLayout) Blur() + func (mcl *MultiColumnLayout) Focus() tea.Cmd + func (mcl *MultiColumnLayout) Focused() bool + func (mcl *MultiColumnLayout) GetActiveColumn() int + func (mcl *MultiColumnLayout) GetColumn(index int) Component + func (mcl *MultiColumnLayout) GetColumnCount() int + func (mcl *MultiColumnLayout) GetSize() (width, height int) + func (mcl *MultiColumnLayout) Init() tea.Cmd + func (mcl *MultiColumnLayout) RemoveColumn(index int) + func (mcl *MultiColumnLayout) SetActiveColumn(index int) + func (mcl *MultiColumnLayout) SetAlignment(align ColumnAlignment) + func (mcl *MultiColumnLayout) SetColumnStyle(index int, style lipgloss.Style) + func (mcl *MultiColumnLayout) SetColumnWeight(index, weight int) + func (mcl *MultiColumnLayout) SetColumnWeights(weights []int) + func (mcl *MultiColumnLayout) SetColumnWidth(index, width int) + func (mcl *MultiColumnLayout) SetColumnWidths(widths []int) + func (mcl *MultiColumnLayout) SetGap(gap int) + func (mcl *MultiColumnLayout) SetSize(width, height int) + func (mcl *MultiColumnLayout) Update(msg tea.Msg) (Component, tea.Cmd) + func (mcl *MultiColumnLayout) View() string + type NotificationPopup interface + AutoClose func() bool + GetDuration func() int + GetMessage func() string + GetType func() string + SetAutoClose func(autoClose bool) + SetDuration func(duration int) + SetMessage func(message string) + SetType func(notificationType string) + type PopupAdapter struct + func NewPopupAdapter() *PopupAdapter + func (p *PopupAdapter) Close() tea.Cmd + func (p *PopupAdapter) GetConfig() PopupConfig + func (p *PopupAdapter) GetPopupDimensions() (width, height int) + func (p *PopupAdapter) GetPopupPosition() (x, y, width, height int) + func (p *PopupAdapter) GetZIndex() int + func (p *PopupAdapter) IsModal() bool + func (p *PopupAdapter) OnClose(callback func()) + func (p *PopupAdapter) RenderPopup() string + func (p *PopupAdapter) SetConfig(config PopupConfig) + func (p *PopupAdapter) SetModal(modal bool) + func (p *PopupAdapter) SetPopupDimensions(width, height int) + func (p *PopupAdapter) SetPopupPosition(x, y int) + func (p *PopupAdapter) SetZIndex(zIndex int) + type PopupAlignment int + const AlignBottomCenter + const AlignBottomLeft + const AlignBottomRight + const AlignCenter + const AlignCenterLeft + const AlignCenterRight + const AlignTopCenter + const AlignTopLeft + const AlignTopRight + type PopupComponent interface + Close func() tea.Cmd + GetPopupDimensions func() (width, height int) + GetPopupPosition func() (x, y, width, height int) + GetZIndex func() int + IsModal func() bool + OnClose func(callback func()) + RenderPopup func() string + SetModal func(modal bool) + SetPopupDimensions func(width, height int) + SetPopupPosition func(x, y int) + SetZIndex func(zIndex int) + type PopupConfig struct + Alignment PopupAlignment + AnimateClose bool + AnimateOpen bool + CloseOnClickOut bool + CloseOnEscape bool + FocusOnOpen bool + Height int + Modal bool + Style PopupStyle + Width int + X int + Y int + ZIndex int + func DefaultPopupConfig() PopupConfig + type PopupManager interface + AddPopup func(popup PopupComponent) error + BringToFront func(popup PopupComponent) + CloseAll func() tea.Cmd + GetActivePopup func() PopupComponent + GetPopupCount func() int + GetPopups func() []PopupComponent + HasPopups func() bool + RemovePopup func(popup PopupComponent) error + SendToBack func(popup PopupComponent) + type PopupStyle struct + BackgroundColor string + BlurBackground bool + BorderColor string + BorderStyle string + Margin int + Padding int + Shadow bool + Transparency float64 + type Reloadable interface + GetLastReloadTime func() int64 + IsReloading func() bool + Reload func() tea.Cmd + type Resettable interface + CanReset func() bool + Reset func() tea.Cmd + type ResizableComponent struct + func NewResizable(component Component, width, height int) *ResizableComponent + func (r *ResizableComponent) AddAllResizeHandles() + func (r *ResizableComponent) AddResizeHandle(pos ResizePosition) + func (r *ResizableComponent) Blur() + func (r *ResizableComponent) DisableAspectRatio() + func (r *ResizableComponent) EnableAspectRatio(ratio float64) + func (r *ResizableComponent) EndResize() + func (r *ResizableComponent) Focus() tea.Cmd + func (r *ResizableComponent) Focused() bool + func (r *ResizableComponent) GetComponent() Component + func (r *ResizableComponent) GetSize() (width, height int) + func (r *ResizableComponent) Init() tea.Cmd + func (r *ResizableComponent) IsResizing() bool + func (r *ResizableComponent) Position() (x, y int) + func (r *ResizableComponent) SetBorderStyle(style lipgloss.Style) + func (r *ResizableComponent) SetComponent(component Component) + func (r *ResizableComponent) SetMaxSize(width, height int) + func (r *ResizableComponent) SetMinSize(width, height int) + func (r *ResizableComponent) SetPosition(x, y int) + func (r *ResizableComponent) SetResizeStyle(style lipgloss.Style) + func (r *ResizableComponent) SetSize(width, height int) + func (r *ResizableComponent) Size() (width, height int) + func (r *ResizableComponent) StartResize(mouseX, mouseY int) + func (r *ResizableComponent) Update(msg tea.Msg) (Component, tea.Cmd) + func (r *ResizableComponent) UpdateResize(mouseX, mouseY int) + func (r *ResizableComponent) View() string + type ResizeHandle struct + Cursor string + Height int + Position ResizePosition + Width int + X int + Y int + type ResizePosition int + const Bottom + const BottomLeft + const BottomRight + const Left + const Right + const Top + const TopLeft + const TopRight + func (rp ResizePosition) String() string + type Scrollable interface + GetScrollPosition func() int + ScrollDown func(lines int) + ScrollToBottom func() + ScrollToTop func() + ScrollUp func(lines int) + SetScrollPosition func(position int) + type ScrollablePopup interface + CanScrollDown func() bool + CanScrollUp func() bool + GetScrollOffset func() int + GetVisibleItemCount func() int + SetScrollOffset func(offset int) + SetVisibleItemCount func(count int) + type Selectable interface + GetSelectedIndex func() int + GetSelectedValue func() interface{} + SelectNext func() + SelectPrevious func() + SetSelectedIndex func(index int) + type SelectablePopup interface + ClearItems func() + FilterItems func(filter func(item interface{}) bool) + GetItemCount func() int + GetItems func() []interface{} + SetItems func(items []interface{}) + SortItems func(less func(i, j interface{}) bool) + type Serializable interface + Deserialize func(data []byte) error + Serialize func() ([]byte, error) + type Sizeable interface + GetSize func() (width, height int) + SetSize func(width, height int) + type SplitView struct + func NewSplitView(left, right Component, orientation layout.Orientation) *SplitView + func (sv *SplitView) Blur() + func (sv *SplitView) DisableDivider() + func (sv *SplitView) EnableDivider() + func (sv *SplitView) EndDividerDrag() + func (sv *SplitView) Focus() tea.Cmd + func (sv *SplitView) Focused() bool + func (sv *SplitView) GetLeftPane() Component + func (sv *SplitView) GetRightPane() Component + func (sv *SplitView) GetSize() (width, height int) + func (sv *SplitView) Init() tea.Cmd + func (sv *SplitView) SetDividerSize(size int) + func (sv *SplitView) SetDividerStyle(style lipgloss.Style) + func (sv *SplitView) SetDragStyle(style lipgloss.Style) + func (sv *SplitView) SetLeftPane(component Component) + func (sv *SplitView) SetMinMaxRatio(min, max float64) + func (sv *SplitView) SetRightPane(component Component) + func (sv *SplitView) SetSize(width, height int) + func (sv *SplitView) SetSplitRatio(ratio float64) + func (sv *SplitView) StartDividerDrag(mouseX, mouseY int) + func (sv *SplitView) SwapPanes() + func (sv *SplitView) Update(msg tea.Msg) (Component, tea.Cmd) + func (sv *SplitView) UpdateDividerDrag(mouseX, mouseY int) + func (sv *SplitView) View() string + type Stateful interface + Hide func() + IsVisible func() bool + Show func() + Toggle func() + type Theme struct + AccentColor string + BackgroundColor string + BorderColor string + Name string + PrimaryColor string + SecondaryColor string + TextColor string + type Themeable interface + GetTheme func() Theme + SetTheme func(theme Theme) + type Validatable interface + GetValidationError func() error + IsValid func() bool + Validate func() error