Files
xterm.js/addons/addon-fit
Daniel Imms b7988bf00a Upgrade playwright tsconfigs to use ESNext
This ends up outputing the required object destructuring that's needed by
playwright, see microsoft/playwright#8798
2024-07-03 04:31:34 -07:00
..
2023-11-02 08:54:49 -07:00
2023-11-01 10:35:10 -07:00
2024-04-05 06:50:30 -07:00
2023-11-01 10:35:10 -07:00
2024-01-13 13:24:15 -06:00

@xterm/addon-fit

An addon for xterm.js that enables fitting the terminal's dimensions to a containing element. This addon requires xterm.js v4+.

Install

npm install --save @xterm/addon-fit

Usage

import { Terminal } from '@xterm/xterm';
import { FitAddon } from '@xterm/addon-fit';

const terminal = new Terminal();
const fitAddon = new FitAddon();
terminal.loadAddon(fitAddon);
terminal.open(containerElement);
fitAddon.fit();

See the full API for more advanced usage.