input-terminal
    Preparing search index...

    An output adapter renders or records command entries, values from terminal.stdout() and terminal.stderr(), and terminal.clearOutput() operations. Pass one through TerminalConfig.output:

    const terminal = new Terminal({ input, output });
    

    Choose an adapter based on who owns the rendered state:

    • DOM appends output to an HTMLElement.
    • React exposes output through an external-store hook.
    • Svelte exposes output through a reactive array.
    • Custom Adapters connect the terminal to another renderer or data store.

    You can omit output when you want a headless terminal. The terminal will still record command logs and dispatch output events.