charmbracelet/bubbles

GitHub: charmbracelet/bubbles

基于 Bubble Tea 框架的终端 UI 组件库,提供开箱即用的文本输入、表格、列表、进度条等常用界面元素

Stars: 7946 | Forks: 367

# Bubbles [![最新版本](https://img.shields.io/github/release/charmbracelet/bubbles.svg)](https://github.com/charmbracelet/bubbles/releases) [![GoDoc](https://godoc.org/github.com/golang/gddo?status.svg)](https://pkg.go.dev/github.com/charmbracelet/bubbles) [![构建状态](https://static.pigsec.cn/wp-content/uploads/repos/2026/03/5ad48d8eb2000213.svg)](https://github.com/charmbracelet/bubbles/actions) [![Go ReportCard](https://goreportcard.com/badge/charmbracelet/bubbles)](https://goreportcard.com/report/charmbracelet/bubbles) [Bubble Tea](https://github.com/charmbracelet/bubbletea) 应用程序的基元。这些组件已在 [Crush][crush] 和 [许多其他应用][otherstuff] 的生产环境中使用。 ## Spinner Spinner Example 一个旋转器,用于指示正在进行某种操作。 有几个默认的样式,但你也可以传递自定义的“帧”。 - [示例代码,基础 spinner](https://github.com/charmbracelet/bubbletea/blob/main/examples/spinner/main.go) - [示例代码,各种 spinner](https://github.com/charmbracelet/bubbletea/blob/main/examples/spinners/main.go) ## Text Input Text Input Example 一个文本输入字段,类似于 HTML 中的 ``。支持 Unicode、粘贴、当值超过元素宽度时的原地滚动,以及常见的和许多自定义选项。 - [示例代码,单字段](https://github.com/charmbracelet/bubbletea/blob/main/examples/textinput/main.go) - [示例代码,多字段](https://github.com/charmbracelet/bubbletea/blob/main/examples/textinputs/main.go) ## Text Area Text Area Example 一个文本区域字段,类似于 HTML 中的 `