bobatea

module
v0.0.28 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2025 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
js-repl command
repl command
sparkline-test command
test-sparkline command
pkg
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.
ttmp

Jump to

Keyboard shortcuts

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