Compose responsive layouts
Use Box, Rows, Columns, Grid, Align, Padder, and flex properties to adapt to terminal resizing.
Open layout components →Collect keyboard input
Build fields, prompts, selectors, comboboxes, sliders, and confirmation flows with focus-aware components.
Open input components →Build an editor
Start with Textarea, LineNumbers, Code, and the rope-backed EditBuffer for editing workflows.
Open editor components →Display structured data
Render tables, grids, trees, charts, diffs, JSON, markdown, and scrollable views.
Open data components →Ship a dotnet tool
Use the File Manager and CSV Viewer projects as complete examples of packable terminal tools.
Open tool examples →Render at cell level
Use CellBuffer, Renderer, Rgba, and ANSI helpers when you need precise drawing and performance control.
Open the API reference →Terminal lifecycle
Host, focus, dispose
Use UseTermBladeRazor<TComponent>() to own terminal setup and teardown. Components already remove their renderables when disposed. If you subscribe to renderer or key events yourself, unsubscribe in Dispose; the executable Razor samples provide a reusable base class that demonstrates this.
.Result, .Wait(), or GetAwaiter().GetResult(). Keep UI work asynchronous.Performance
Keep the frame path small
TermBlade performs diff-based output, so only changed terminal cells are emitted. In per-frame code, avoid converting buffers to strings repeatedly, allocating temporary writers, or doing broad LINQ queries. The renderer and architecture rationale are documented in the repository.