README.md
This file
Path
examples/README.md
328 lines · 7.5 KiB · Markdown
Last changed by
Merge pull request #1118 from charmbracelet/v2-expAyman Bagabasbefore adoptiond1c8c97
History of this fileTake it
The walk stopped after 200 commits: lines older than 3dfbcd9 point at it.
feat(render): skipping lines from previous frameKonstantin Antonovbefore adoption3dfbcd9
lines 1–29why, one step back1# Examples23### Alt Screen Toggle45The `altscreen-toggle` example shows how to transition between the alternative6screen buffer and the normal screen buffer using Bubble Tea.78<a href="./altscreen-toggle/main.go">9 <img width="750" src="./altscreen-toggle/altscreen-toggle.gif" />10</a>1112### Chat1314The `chat` examples shows a basic chat application with a multi-line `textarea`15input.1617<a href="./chat/main.go">18 <img width="750" src="./chat/chat.gif" />19</a>2021### Composable Views2223The `composable-views` example shows how to compose two bubble models (spinner24and timer) together in a single application and switch between them.2526<a href="./composable-views/main.go">27 <img width="750" src="./composable-views/composable-views.gif" />28</a>29Merge pull request #1118 from charmbracelet/v2-expAyman Bagabasbefore adoptiond1c8c97
line 30why, one step back30### ISBN Book Formfeat(render): skipping lines from previous frameKonstantin Antonovbefore adoption3dfbcd9
line 31why, one step back31Merge pull request #1118 from charmbracelet/v2-expAyman Bagabasbefore adoptiond1c8c97
lines 32–33why, one step back32The `isbn-form` example demonstrates how to build a multi-step form with33`textinput` bubbles and validation on the inputs.feat(render): skipping lines from previous frameKonstantin Antonovbefore adoption3dfbcd9
line 34why, one step back34Merge pull request #1118 from charmbracelet/v2-expAyman Bagabasbefore adoptiond1c8c97
lines 35–36why, one step back35<a href="./isbn-form/main.go">36 <img width="750" src="./isbn-form/isbn-form.gif" />feat(render): skipping lines from previous frameKonstantin Antonovbefore adoption3dfbcd9
lines 37–328why, one step back37</a>3839### Debounce4041The `debounce` example shows how to throttle key presses to avoid overloading42your Bubble Tea application.4344<a href="./debounce/main.go">45 <img width="750" src="./debounce/debounce.gif" />46</a>4748### Exec4950The `exec` example shows how to execute a running command during the execution51of a Bubble Tea application such as launching an `EDITOR`.52 53<a href="./exec/main.go">54 <img width="750" src="./exec/exec.gif" />55</a>5657### Full Screen5859The `fullscreen` example shows how to make a Bubble Tea application fullscreen.6061<a href="./fullscreen/main.go">62 <img width="750" src="./fullscreen/fullscreen.gif" />63</a>6465### Glamour6667The `glamour` example shows how to use [Glamour](https://github.com/charmbracelet/glamour) inside a viewport bubble.6869<a href="./glamour/main.go">70 <img width="750" src="./glamour/glamour.gif" />71</a>7273### Help7475The `help` example shows how to use the `help` bubble to display help to the76user of your application.7778<a href="./help/main.go">79 <img width="750" src="./help/help.gif" />80</a>8182### Http8384The `http` example shows how to make an `http` call within your Bubble Tea85application.8687<a href="./http/main.go">88 <img width="750" src="./http/http.gif" />89</a>9091### Default List9293The `list-default` example shows how to use the list bubble.9495<a href="./list-default/main.go">96 <img width="750" src="./list-default/list-default.gif" />97</a>9899### Fancy List100101The `list-fancy` example shows how to use the list bubble with extra customizations.102103<a href="./list-fancy/main.go">104 <img width="750" src="./list-fancy/list-fancy.gif" />105</a>106107### Simple List108109The `list-simple` example shows how to use the list and customize it to have a simpler, more compact, appearance.110111<a href="./list-simple/main.go">112 <img width="750" src="./list-simple/list-simple.gif" />113</a>114115### Mouse116117The `mouse` example shows how to receive mouse events in a Bubble Tea118application.119120<a href="./mouse/main.go">121 Code122</a>123124### Package Manager125126The `package-manager` example shows how to build an interface for a package127manager using the `tea.Println` feature.128129<a href="./package-manager/main.go">130 <img width="750" src="./package-manager/package-manager.gif" />131</a>132133### Pager134135The `pager` example shows how to build a simple pager application similar to136`less`.137138<a href="./pager/main.go">139 <img width="750" src="./pager/pager.gif" />140</a>141142### Paginator143144The `paginator` example shows how to build a simple paginated list.145146<a href="./paginator/main.go">147 <img width="750" src="./paginator/paginator.gif" />148</a>149150### Pipe151152The `pipe` example demonstrates using shell pipes to communicate with Bubble153Tea applications.154155<a href="./pipe/main.go">156 <img width="750" src="./pipe/pipe.gif" />157</a>158159### Animated Progress160161The `progress-animated` example shows how to build a progress bar with an162animated progression.163164<a href="./progress-animated/main.go">165 <img width="750" src="./progress-animated/progress-animated.gif" />166</a>167168### Download Progress169170The `progress-download` example demonstrates how to download a file while171indicating download progress through Bubble Tea.172173<a href="./progress-download/main.go">174 Code175</a>176177### Static Progress178179The `progress-static` example shows a progress bar with static incrementation180of progress.181182<a href="./progress-static/main.go">183 <img width="750" src="./progress-static/progress-static.gif" />184</a>185186### Real Time187188The `realtime` example demonstrates the use of go channels to perform realtime189communication with a Bubble Tea application.190191<a href="./realtime/main.go">192 <img width="750" src="./realtime/realtime.gif" />193</a>194195### Result196197The `result` example shows a choice menu with the ability to select an option.198199<a href="./result/main.go">200 <img width="750" src="./result/result.gif" />201</a>202203### Send Msg204205The `send-msg` example demonstrates the usage of custom `tea.Msg`s.206207<a href="./send-msg/main.go">208 <img width="750" src="./send-msg/send-msg.gif" />209</a>210211### Sequence212213The `sequence` example demonstrates the `tea.Sequence` command.214215<a href="./sequence/main.go">216 <img width="750" src="./sequence/sequence.gif" />217</a>218219### Simple220221The `simple` example shows a very simple Bubble Tea application.222223<a href="./simple/main.go">224 <img width="750" src="./simple/simple.gif" />225</a>226227### Spinner228229The `spinner` example demonstrates a spinner bubble being used to indicate loading.230231<a href="./spinner/main.go">232 <img width="750" src="./spinner/spinner.gif" />233</a>234235### Spinners236237The `spinner` example shows various spinner types that are available.238239<a href="./spinners/main.go">240 <img width="750" src="./spinners/spinners.gif" />241</a>242243### Split Editors244245The `split-editors` example shows multiple `textarea`s being used in a single246application and being able to switch focus between them.247248<a href="./split-editors/main.go">249 <img width="750" src="./split-editors/split-editors.gif" />250</a>251252### Stop Watch253254The `stopwatch` example shows a sample stop watch built with Bubble Tea.255256<a href="./stopwatch/main.go">257 <img width="750" src="./stopwatch/stopwatch.gif" />258</a>259260### Table261262The `table` example demonstrates the table bubble being used to display tabular263data.264265<a href="./table/main.go">266 <img width="750" src="./table/table.gif" />267</a>268269### Tabs270271The `tabs` example demonstrates tabbed navigation styled with [Lip Gloss](https://github.com/charmbracelet/lipgloss).272273<a href="./tabs/main.go">274 <img width="750" src="./tabs/tabs.gif" />275</a>276277### Text Area278279The `textarea` example demonstrates a simple Bubble Tea application using a280`textarea` bubble.281282<a href="./textarea/main.go">283 <img width="750" src="./textarea/textarea.gif" />284</a>285286### Text Input287288The `textinput` example demonstrates a simple Bubble Tea application using a `textinput` bubble.289290<a href="./textinput/main.go">291 <img width="750" src="./textinput/textinput.gif" />292</a>293294### Multiple Text Inputs295296The `textinputs` example shows multiple `textinputs` and being able to switch297focus between them as well as changing the cursor mode.298299<a href="./textinputs/main.go">300 <img width="750" src="./textinputs/textinputs.gif" />301</a>302303### Timer304305The `timer` example shows a simple timer built with Bubble Tea.306307<a href="./timer/main.go">308 <img width="750" src="./timer/timer.gif" />309</a>310311### TUI Daemon312313The `tui-daemon-combo` demonstrates building a text-user interface along with a314daemon mode using Bubble Tea.315316<a href="./tui-daemon-combo/main.go">317 <img width="750" src="./tui-daemon-combo/tui-daemon-combo.gif" />318</a>319320### Views321322The `views` example demonstrates how to build a Bubble Tea application with323multiple views and switch between them.324325<a href="./views/main.go">326 <img width="750" src="./views/views.gif" />327</a>328