You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
640 B

10 months ago
  1. ## xterm-addon-fit
  2. An addon for [xterm.js](https://github.com/xtermjs/xterm.js) that enables fitting the terminal's dimensions to a containing element. This addon requires xterm.js v4+.
  3. ### Install
  4. ```bash
  5. npm install --save xterm-addon-fit
  6. ```
  7. ### Usage
  8. ```ts
  9. import { Terminal } from 'xterm';
  10. import { FitAddon } from 'xterm-addon-fit';
  11. const terminal = new Terminal();
  12. const fitAddon = new FitAddon();
  13. terminal.loadAddon(fitAddon);
  14. terminal.open(containerElement);
  15. fitAddon.fit();
  16. ```
  17. See the full [API](https://github.com/xtermjs/xterm.js/blob/master/addons/xterm-addon-fit/typings/xterm-addon-fit.d.ts) for more advanced usage.