Skip to content
Kite
Menu

Build terminal interfaces like the web.

KITE / GO UI TOOLKIT

Build terminal interfaces like the web.

Compose Go components, lay them out in terminal cells, and bring them to life with the keyboard and mouse.

DOM & Events · Flexbox & Grid · Reactive Kitex · Headless Testing
FIELD GUIDE / 01   ·   Composition

Create terminal UIs from components

A badge, a button, a package card. Give each piece its own state, then compose them together.

package_card.go
var StarButton = kitex.FC(
"StarButton",
func(_ kitex.NoProps) kitex.Node {
starred, setStarred := kitex.UseState(false)
count := 128
btnStyle := buttonStyle
if starred() {
count = 129
btnStyle = starredButtonStyle
}
return kitex.Button(kitex.ButtonProps{
Style: btnStyle,
OnPress: func() {
setStarred(!starred())
},
}, kitex.Textf("★ %d", count))
},
)
package_cardWASM
Starting terminal…
Star a package or install it. Esc to leave
FIELD GUIDE / 02   ·   Geometry

Flexbox, CSS Grid & 60FPS animations

Describe the tracks, not the pixels. Switch presets and watch the engine distribute terminal cells between panels.

grid_layout.go
play.Cancel()
current := grid.RawStyle().GridTemplateColumnsOpt().Value()
from := style.S().GridTemplateColumns(current...)
to := style.S().GridTemplateColumns(
style.Fr(preset.left),
style.Fr(preset.right),
)
opts := animation.Options{
Duration: 420 * time.Millisecond,
Easing: animation.EaseInOutCubic,
}
play = grid.Animate(from, to, opts)
grid_layoutWASM
Starting terminal…
Choose a grid preset. Esc to leave
FIELD GUIDE / 03   ·   Interaction

Real inputs, focus & keyboard navigation

Type a name, opt into release notes, and submit. Editing, focus, and validation all happen inside the terminal.

signup_form.go
inputStyle := style.S().
Width(style.Cells(34)).
Border(style.SingleBorder().Color(colorBorder)).
Focus(style.S().
Border(style.SingleBorder().Color(colorAccent)))
kitex.Form(kitex.FormProps{OnSubmit: handleSubmit},
kitex.Input(kitex.InputProps{
Name: "name",
Placeholder: "Your name",
Style: inputStyle,
}),
kitex.Checkbox(kitex.CheckboxProps{Name: "updates"}),
kitex.Button(kitex.ButtonProps{
Style: primaryButtonStyle,
}, kitex.Text("Join")),
)
signup_formWASM
Starting terminal…
Click a field or use Tab. Esc to leave
FIELD GUIDE / 04   ·   Rendering

Retained DOM or reactive Kitex — same engine

Keep a reference to each service row. Filter the live sample without rebuilding the table or drawing a single border junction.

table_view.go
cellStyle := style.S().
Border(style.SingleBorder().Color(colorBorder)).
Padding(0, 1)
latencyStyle := cellStyle.TextAlign(style.TextAlignRight)
row := element.TR(
element.TD(svc.name).Style(cellStyle),
element.TD(statusLabel).Style(statusStyle),
element.TD(latency).Style(latencyStyle),
)
// Filter without rebuilding rows or border junctions:
for i, row := range rows {
if active == "All" || services[i].health == active {
body.AppendChild(row)
}
}
table_viewWASM
Starting terminal…
Filter the service list. Esc to leave
NEXT STEPS

Choose your layer

Open the DevTools guide →