Back to Bubbletea

Examples

examples/README.md

2.0.67.5 KB
Original Source

Examples

Alt Screen Toggle

The altscreen-toggle example shows how to transition between the alternative screen buffer and the normal screen buffer using Bubble Tea.

<a href="./altscreen-toggle/main.go"> </a>

Chat

The chat examples shows a basic chat application with a multi-line textarea input.

<a href="./chat/main.go"> </a>

Composable Views

The composable-views example shows how to compose two bubble models (spinner and timer) together in a single application and switch between them.

<a href="./composable-views/main.go"> </a>

ISBN Book Form

The isbn-form example demonstrates how to build a multi-step form with textinput bubbles and validation on the inputs.

<a href="./isbn-form/main.go"> </a>

Debounce

The debounce example shows how to throttle key presses to avoid overloading your Bubble Tea application.

<a href="./debounce/main.go"> </a>

Exec

The exec example shows how to execute a running command during the execution of a Bubble Tea application such as launching an EDITOR.

<a href="./exec/main.go"> </a>

Full Screen

The fullscreen example shows how to make a Bubble Tea application fullscreen.

<a href="./fullscreen/main.go"> </a>

Glamour

The glamour example shows how to use Glamour inside a viewport bubble.

<a href="./glamour/main.go"> </a>

Help

The help example shows how to use the help bubble to display help to the user of your application.

<a href="./help/main.go"> </a>

Http

The http example shows how to make an http call within your Bubble Tea application.

<a href="./http/main.go"> </a>

Default List

The list-default example shows how to use the list bubble.

<a href="./list-default/main.go"> </a>

Fancy List

The list-fancy example shows how to use the list bubble with extra customizations.

<a href="./list-fancy/main.go"> </a>

Simple List

The list-simple example shows how to use the list and customize it to have a simpler, more compact, appearance.

<a href="./list-simple/main.go"> </a>

Mouse

The mouse example shows how to receive mouse events in a Bubble Tea application.

<a href="./mouse/main.go"> Code </a>

Package Manager

The package-manager example shows how to build an interface for a package manager using the tea.Println feature.

<a href="./package-manager/main.go"> </a>

Pager

The pager example shows how to build a simple pager application similar to less.

<a href="./pager/main.go"> </a>

Paginator

The paginator example shows how to build a simple paginated list.

<a href="./paginator/main.go"> </a>

Pipe

The pipe example demonstrates using shell pipes to communicate with Bubble Tea applications.

<a href="./pipe/main.go"> </a>

Animated Progress

The progress-animated example shows how to build a progress bar with an animated progression.

<a href="./progress-animated/main.go"> </a>

Download Progress

The progress-download example demonstrates how to download a file while indicating download progress through Bubble Tea.

<a href="./progress-download/main.go"> Code </a>

Static Progress

The progress-static example shows a progress bar with static incrementation of progress.

<a href="./progress-static/main.go"> </a>

Real Time

The realtime example demonstrates the use of go channels to perform realtime communication with a Bubble Tea application.

<a href="./realtime/main.go"> </a>

Result

The result example shows a choice menu with the ability to select an option.

<a href="./result/main.go"> </a>

Send Msg

The send-msg example demonstrates the usage of custom tea.Msgs.

<a href="./send-msg/main.go"> </a>

Sequence

The sequence example demonstrates the tea.Sequence command.

<a href="./sequence/main.go"> </a>

Simple

The simple example shows a very simple Bubble Tea application.

<a href="./simple/main.go"> </a>

Spinner

The spinner example demonstrates a spinner bubble being used to indicate loading.

<a href="./spinner/main.go"> </a>

Spinners

The spinner example shows various spinner types that are available.

<a href="./spinners/main.go"> </a>

Split Editors

The split-editors example shows multiple textareas being used in a single application and being able to switch focus between them.

<a href="./split-editors/main.go"> </a>

Stop Watch

The stopwatch example shows a sample stop watch built with Bubble Tea.

<a href="./stopwatch/main.go"> </a>

Table

The table example demonstrates the table bubble being used to display tabular data.

<a href="./table/main.go"> </a>

Tabs

The tabs example demonstrates tabbed navigation styled with Lip Gloss.

<a href="./tabs/main.go"> </a>

Text Area

The textarea example demonstrates a simple Bubble Tea application using a textarea bubble.

<a href="./textarea/main.go"> </a>

Text Input

The textinput example demonstrates a simple Bubble Tea application using a textinput bubble.

<a href="./textinput/main.go"> </a>

Multiple Text Inputs

The textinputs example shows multiple textinputs and being able to switch focus between them as well as changing the cursor mode.

<a href="./textinputs/main.go"> </a>

Timer

The timer example shows a simple timer built with Bubble Tea.

<a href="./timer/main.go"> </a>

TUI Daemon

The tui-daemon-combo demonstrates building a text-user interface along with a daemon mode using Bubble Tea.

<a href="./tui-daemon-combo/main.go"> </a>

Views

The views example demonstrates how to build a Bubble Tea application with multiple views and switch between them.

<a href="./views/main.go"> </a>