Skip to main content

Crate bubbles

Crate bubbles 

Source
Expand description

§Bubbles

A collection of reusable TUI components for the Bubbletea framework.

Bubbles provides ready-to-use components including:

  • cursor - Text cursor with blinking support
  • spinner - Animated loading indicators with multiple styles
  • timer - Countdown timer with timeout notifications
  • stopwatch - Elapsed time tracking
  • paginator - Pagination for lists and tables
  • progress - Progress bar with gradient and animation support
  • viewport - Scrollable content viewport
  • help - Help view for displaying key bindings
  • key - Key binding definitions and matching
  • runeutil - Input sanitization utilities
  • textinput - Single-line text input with suggestions
  • textarea - Multi-line text editor
  • table - Data table with keyboard navigation
  • list - Feature-rich filterable list
  • filepicker - File system browser

§Role in charmed_rust

Bubbles is the component layer that sits on top of bubbletea and lipgloss:

  • bubbletea provides the runtime and message loop.
  • lipgloss provides styling used by every component.
  • huh and glow embed bubbles components directly.
  • demo_showcase uses bubbles to demonstrate real-world UI composition.

§Example

use bubbles::spinner::{SpinnerModel, spinners};

let spinner = SpinnerModel::with_spinner(spinners::dot());
let tick_msg = spinner.tick();

Modules§

cursor
Cursor component with blinking support.
filepicker
File picker component for browsing and selecting files.
help
Help view component.
key
Keybinding definitions and matching utilities.
list
Feature-rich list component with filtering and pagination.
paginator
Pagination component for navigating through pages.
prelude
Prelude module for convenient imports.
progress
Progress bar component.
runeutil
Rune/character sanitization utilities.
spinner
Spinner component for loading indicators.
stopwatch
Stopwatch component for tracking elapsed time.
table
Table component for displaying tabular data.
textarea
Multi-line text area component.
textinput
Single-line text input component.
timer
Countdown timer component.
viewport
Scrollable viewport component.