BentoTUI Architecture

BentoTUI is a registry of copy-and-own terminal UI components built on Bubble Tea v2 and Lip Gloss v2.

Model

Copy and own

Live now

8 components

Core imports

theme, styles, layout


How It Works

Two things live in this repo:

ThingWhat it is
componentAtomic UI piece. bento add input copies it into your project.
bentosPre-built layout composition. A complete screen pattern you copy wholesale.
registry/components/   ← copied into your project by `bento add`
bentos/                ← complete runnable screen patterns

Architecture Stack

Your Appregistry/components/Copied into your project — you own the sourcesurface · bar · input · panel · dialog · list · table · textbentotui module depsReal Go imports — not copiedtheme · styles · layoutCharm StackThe foundationBubble Tea v2 · Lip Gloss v2 · Ultraviolet

Core Packages (Real Imports)

These are stable module deps your project imports directly:

PackageImport PathWhat it is
themegithub.com/cloudboy-jh/bentotui/themeGlobal theme store, 15 presets, goroutine-safe
stylesgithub.com/cloudboy-jh/bentotui/stylesTheme → Lip Gloss style mapping
layoutgithub.com/cloudboy-jh/bentotui/layoutHorizontal / Vertical split layout

The surface Primitive

surface is the key rendering primitive. It wraps Ultraviolet’s cell buffer so every cell is explicitly painted before Bubble Tea flushes the frame — eliminating ANSI whitespace-reset bleed that occurs with pure string composition.

Used by every full-screen layout.


Components

All components live in registry/components/ and are copied into your project by bento add. Once copied they live at yourmodule/components/<name> — you own the source.

Available Now

ComponentDescription
surfaceFull-screen cell buffer backed by Ultraviolet. Deterministic background paint — no ANSI whitespace bleed. Used by every full-screen layout.
barStatus/nav bar with left + right slots.
inputSingle-line text input with left-border accent. Wraps bubbles/textinput.
panelTitled, focusable content container.
dialogModal manager — Confirm, Custom, ThemePicker.
listScrollable log-style list.
tableHeader + data rows.
textStatic styled label.

Coming Next — Tier 1

ComponentDescription
badgeInline colored label.
kbdKeyboard shortcut display. Dim/bright pair.
wordmarkLarge centered app name. Theme-colored, responsive.
statusbarStandalone registry version of bar.

Tier 2

ComponentDescription
selectSingle-choice picker. Opens inline.
checkboxTogglable boolean.
textareaMulti-line input. Wraps bubbles/textarea.
spinnerLoading indicator. Wraps bubbles/spinner.
progressProgress bar with optional label.

Tier 3

ComponentDescription
commandCommand palette with fuzzy search.
toastEphemeral notification. Auto-dismisses, stacks.
tabsHorizontal tab switcher.
separatorHorizontal or vertical rule.

Bentos

Bentos are complete runnable screen patterns you copy wholesale. Each is a single self-contained .go file demonstrating real component usage.

bentos/
  home-screen/   ← mirrors starter app (coming soon)
  app-shell/
  dashboard/
  detail-view/
  form/
  log-viewer/
  settings/
  command-view/

Planned Bentos

BentoComponents Used
home-screenwordmark, input, kbd, badge, bar, surface
app-shellpanel, layout, bar, tabs, surface
dashboardpanel, badge, table, layout, surface
detail-viewlist, panel, layout, surface
forminput, textarea, checkbox, badge, surface
log-viewerinput, panel, spinner, badge, surface
settingslist, panel, checkbox, layout, surface
command-viewcommand, input, list, surface

Theme System

15 built-in presets:

// Set once at startup
theme.SetTheme("tokyo-night")

// Components always call this in View() — never cache it
t := theme.CurrentTheme()

Available themes: catppuccin-mocha (default), catppuccin-macchiato, catppuccin-frappe, dracula, tokyo-night, tokyo-night-storm, nord, gruvbox-dark, monokai-pro, kanagawa, rose-pine, ayu-mirage, one-dark, material-ocean, github-dark.

Switch themes at runtime via the /theme command in the starter app.


CLI Usage

# Install the CLI
go install github.com/cloudboy-jh/bentotui/cmd/bento@latest

# Copy components into your project
bento add input bar surface

# Run the starter app
go run ./cmd/starter-app