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 TestingFIELD 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.
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)) },)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.
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)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.
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")),)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.
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) }}Choose your layer
REACTIVEKitex →Compose stateful Go components with hooks and CreateRoot.DOMElements →Work directly with retained elements, tables, overlays, and dialogs.INLINE CLITrail →Render live progress while flushing completed output to scrollback.TOOLINGTestenv & DevTools →Test framebuffers headlessly and inspect live apps in your browser.
Open the DevTools guide →