TuilRenderOptions
interface exported by @mwillbanks/tuil-ink.
interface
Public interface exported by @mwillbanks/tuil-ink.
export interface TuilRenderOptions extends RenderOptions {
readonly semanticRegistry?: SemanticRegistry;
}Members
| Member | Type | Required | Description | Related types |
|---|---|---|---|---|
semanticRegistry | SemanticRegistry | undefined | No | The semanticRegistry member uses the SemanticRegistry | undefined contract. | SemanticRegistry |
stdout | NodeJS.WriteStream | undefined | No | Output stream where the app will be rendered. | — |
stdin | NodeJS.ReadStream | undefined | No | Input stream where app will listen for input. | — |
stderr | NodeJS.WriteStream | undefined | No | Error stream. | — |
debug | boolean | undefined | No | If true, each update will be rendered as separate output, without replacing the previous one. | — |
exitOnCtrlC | boolean | undefined | No | Configure whether Ink should listen for Ctrl+C keyboard input and exit the app. This is needed in case process.stdin is in raw mode, because then Ctrl+C is ignored by default and the process is expected to handle it manually. | — |
patchConsole | boolean | undefined | No | Patch console methods to ensure console output doesn't mix with Ink's output. Note: Once unmount starts, Ink restores the native console before React cleanup runs. Teardown-time console.* output then follows the normal console behavior instead of being rerouted through Ink. | — |
onRender | ((metrics: RenderMetrics) => void) | undefined | No | Runs the given callback after each render and re-render with render metrics. Note: this callback runs after Ink commits a frame, but it does not wait for stdout/stderr stream callbacks. To run code after output is flushed, use waitUntilRenderFlush(). | — |
isScreenReaderEnabled | boolean | undefined | No | Enable screen reader support. See https://github.com/vadimdemedes/ink/blob/master/readme.md#screen-reader-support | — |
maxFps | number | undefined | No | Maximum frames per second for render updates. This controls how frequently the UI can update to prevent excessive re-rendering. Higher values allow more frequent updates but may impact performance. | — |
incrementalRendering | boolean | undefined | No | Enable incremental rendering mode which only updates changed lines instead of redrawing the entire output. This can reduce flickering and improve performance for frequently updating UIs. | — |
concurrent | boolean | undefined | No | Enable React Concurrent Rendering mode. When enabled: - Suspense boundaries work correctly with async data - useTransition and useDeferredValue are fully functional - Updates can be interrupted for higher priority work Note: Concurrent mode changes the timing of renders. Some tests may need to use act() to properly await updates. Reusing the same stdout across multiple render() calls without unmounting is unsupported. Call unmount() first if you need to change the rendering mode or create a fresh instance. | — |
kittyKeyboard | KittyKeyboardOptions | undefined | No | Configure kitty keyboard protocol support for enhanced keyboard input. Enables additional modifiers (super, hyper, capsLock, numLock) and disambiguated key events in terminals that support the protocol. | — |
interactive | boolean | undefined | No | Override automatic interactive mode detection. By default, Ink detects whether the environment is interactive based on CI detection (via is-in-ci) and stdout.isTTY. Most users should not need to set this. When non-interactive, Ink disables ANSI erase sequences, cursor manipulation, synchronized output, resize handling, and kitty keyboard auto-detection, writing only the final frame at unmount. Set to false to force non-interactive mode or true to force interactive mode when the automatic detection doesn't suit your use case. Note: Reusing the same stdout across multiple render() calls without unmounting is unsupported. Call unmount() first if you need to change this option or create a fresh instance. | — |
alternateScreen | boolean | undefined | No | Render the app in the terminal's alternate screen buffer. When enabled, the app renders on a separate screen, and the original terminal content is restored when the app exits. This is the same mechanism used by programs like vim, htop, and less. Note: The terminal's scrollback buffer is not available while in the alternate screen. This is standard terminal behavior; programs like vim use the alternate screen specifically to avoid polluting the user's scrollback history. Note: Ink intentionally treats alternate-screen teardown output as disposable. It does not preserve or replay teardown-time frames, hook writes, or console.* output after restoring the primary screen. Only works in interactive mode. Ignored when interactive is false or in a non-interactive environment (CI, piped stdout). Note: Reusing the same stdout across multiple render() calls without unmounting is unsupported. Call unmount() first if you need to change this option or create a fresh instance. | — |
Parameters
This declaration has no public members.
Returns
This declaration does not return a value.
Throws
No thrown errors are documented for this declaration.
Related types
Source
View the secondary source reference