- Read
docs/getting-started.md - Run
bun install && bun run build-ffi - Use
docs/components-and-styling.mdfor current public components and props - Use
docs/state-events-lifecycle.mdfor signals, focus, input, and cleanup - Use
docs/releasing.mdwhen cutting a new npm release
- layout primitives:
Box,Row,Column - leaf nodes:
Text,Input,Button - scrolling container:
ScrollView - shared style props live in
StyleProps: borders, padding, colors, flex, sizing, min/max, margins, alignment, wrapping, box sizing - box-only props live in
BoxProps:gap,direction - direction supports
row,column,rowReverse,columnReverse - current docs treat code as source of truth; anything outside exported prop types is not public API
- JS keeps a previous sent-tree snapshot and compares it against the current node tree each frame
- compatible tree shape => send style deltas and text ops only
- incompatible tree shape => clear Rust tree state and rebuild it once
- Rust owns persistent tree state, layout, paint, terminal buffers, and incremental flush
- Rust text layout treats explicit newlines as hard row boundaries; wrap and overflow happen there, not in JS
- debug metrics phases:
js,render,sync,flush - auto appearance starts with a terminal color-scheme request plus OSC 11 fallback, then listens for DEC 2031 live updates when supported
Textwrapping, clipping, overflow, and newline layout are shipped in the rendererInputsupports append-at-end typing, backspace-from-end, and multiline newline insertionInputis not yet a full editor: no caret movement, mid-buffer insertion, selection, or scrollingplaceholderexists in props today but is not rendered yet
examples/anitrack.ts: interactive torrent-search demoexamples/anki.ts: two-screen Anki-style flashcard UI demoexamples/ai-agent.ts: chat-style agent UI demoexamples/fuzzy-file-search.ts: file finder demo backed by@ff-labs/fff-nodeexamples/smoke.ts: deterministic smoke-test fixtureexamples/snake.ts: keyboard-driven game demoexamples/typing-speed.ts: centered Colemak Mod-DH typing testerexamples/text.ts: wrap, overflow, box sizing, and input layout demoexamples/visualizer.ts: animated styled-text visualizationexamples/progress-bar.ts: reusable loading bar helper used by demosexamples/colors.ts: demo-only palettes
Repo-local agent skills live in .agents/skills/.
.agents/skills/kitty-tui-control/SKILL.md: kitty tab/window control for interactive terminal testing
- use Bun, not Node, for runtime in this repo
- colors are numeric hex (
0xRRGGBB), not CSS strings Ctrl+Qis always the default quit path- keep node identity stable when possible; recreating whole subtrees defeats incremental sync
- examples and scripts are part of typecheck; if docs drift from code, fix docs/examples first