How-to guides

Find a focused recipe, then open the exact runnable example.

These guides answer common implementation questions. Each one points to the relevant component documentation and an example that already exists in this repository.

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.

Do not block async Razor/WebAssembly code with .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.

Read performance guidance Read architecture