bobatea

module
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2026 License: MIT

README ¶

GO GO BOBA TEA

This package contains either modified versions of common Bubble Tea bubbles or custom UI widgets with enhanced functionality and performance.

Components

Core UI Widgets
Specialized Components
  • listbox - Enhanced listbox with advanced selection and filtering capabilities

  • buttons - Button components with various styles and states

  • chat - Chat interface components for conversational applications

  • overlay - Modal and overlay components for layered UI

  • autocomplete - Autocomplete input with customizable suggestions

  • mode-keymap - Mode-based keyboard mapping system

  • sparkline - Terminal data visualization component for displaying trends in compact charts (Documentation)

Quick Start

import (
    "github.com/go-go-golems/bobatea/pkg/repl"
    "github.com/go-go-golems/bobatea/pkg/filepicker"
    "github.com/go-go-golems/bobatea/pkg/textarea"
    "github.com/go-go-golems/bobatea/pkg/sparkline"
)

// Use components in your Bubble Tea application
func main() {
    // Create a REPL with custom evaluator
    evaluator := &MyEvaluator{}
    config := repl.DefaultConfig()
    replModel := repl.NewModel(evaluator, config)
    
    // Create a filepicker
    picker := filepicker.New(
        filepicker.WithStartPath("."),
        filepicker.WithShowPreview(true),
    )
    
    // Create a sparkline for data visualization
    sparklineConfig := sparkline.Config{
        Width:  40,
        Height: 6,
        Style:  sparkline.StyleBars,
        Title:  "CPU Usage",
    }
    chart := sparkline.New(sparklineConfig)
    
    // Run your application
    p := tea.NewProgram(replModel)
    p.Run()
}

Features

  • 🔧 Performance Optimized - Components are optimized for large datasets and complex UIs
  • 🎨 Themeable - Comprehensive theming system with built-in and custom themes
  • 📦 Composable - Components work well together and can be easily combined
  • 🔌 Extensible - Plugin architecture for custom functionality
  • 📚 Well Documented - Comprehensive documentation and examples
  • 🧪 Tested - Thoroughly tested components with examples

Documentation

Contributing

Contributions are welcome! Please see the individual component documentation for specific contribution guidelines.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Directories ¶

Path Synopsis
cmd
autocomplete command
buttons command
chat command
filepicker command
filepicker-demo command
listbox command
overlay command
test-dir-mode command
test-glob command
textarea command
timeline-demo command
examples
diff/json-dir command
repl command
sparkline-test command
test-sparkline command
pkg
diff
Package diff provides a minimal, reusable structured-data diff viewer for Bubble Tea applications.
Package diff provides a minimal, reusable structured-data diff viewer for Bubble Tea applications.
sparkline
Package sparkline provides a flexible, feature-rich sparkline component for terminal applications.
Package sparkline provides a flexible, feature-rich sparkline component for terminal applications.
tui/asyncprovider
Package asyncprovider contains shared helpers for running UI provider calls with timeout and panic recovery semantics.
Package asyncprovider contains shared helpers for running UI provider calls with timeout and panic recovery semantics.
tui/inputhistory
Package inputhistory provides a reusable bounded input history state machine with up/down navigation semantics for terminal input widgets.
Package inputhistory provides a reusable bounded input history state machine with up/down navigation semantics for terminal input widgets.
tui/widgets/contextbar
Package contextbar provides a reusable, asynchronous context/help bar widget.
Package contextbar provides a reusable, asynchronous context/help bar widget.
tui/widgets/contextpanel
Package contextpanel provides a reusable contextual side-panel widget.
Package contextpanel provides a reusable contextual side-panel widget.
tui/widgets/suggest
Package suggest provides a reusable inline suggestion/autocomplete widget.
Package suggest provides a reusable inline suggestion/autocomplete widget.

Jump to

Keyboard shortcuts

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