Xterm.js is a front-end component written in TypeScript that lets applications bring fully-featured terminals to their users in the browser. It's used by popular projects such as VS Code, Hyper and Theia.
Features
- Terminal apps just work: Xterm.js works with most terminal apps such as
bash,vim, andtmux, including support for curses-based apps and mouse events. - Performant: Xterm.js is really fast, it even includes a GPU-accelerated renderer.
- Rich Unicode support: Supports CJK, emojis, and IMEs.
- Self-contained: Requires zero dependencies to work.
- Accessible: Screen reader and minimum contrast ratio support can be turned on.
- And much more: Links, theming, addons, well documented API, etc.
What xterm.js is not
- Xterm.js is not a terminal application that you can download and use on your computer.
- Xterm.js is not
bash. Xterm.js can be connected to processes likebashand let you interact with them (provide input, receive output).
Getting Started
First, you need to install the module, we ship exclusively through npm, so you need that installed and then add xterm.js as a dependency by running:
npm install xtermTo start using xterm.js on your browser, add the xterm.js and xterm.css to the head of your HTML page. Then create a <div id="terminal"></div> onto which xterm can attach itself. Finally, instantiate the Terminal object and then call the open function with the DOM object of the div.


