
Xterm.js is a frontend component that enables applications to bring fully-featured terminals to their users in the browser. It's used by popular projects such as VS Code (and its forks), Tabby and Hyper.
Features
- Terminal apps just work: Xterm.js works with most terminal apps such as
bash, vim, and tmux, including support for curses-based apps and mouse events.
- Performant: Xterm.js is really fast and includes an optional GPU-accelerated renderer.
- Rich Unicode support: Supports CJK, emojis, and IMEs.
- Self-contained: The core library has zero dependencies.
- Accessible: Screen reader mode and minimum contrast ratio support can be turned on.
- And much more: Links, theming, custom glyphs, 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 like bash and let you interact with them (provide input, receive output) through a library like node-pty.
Getting Started
First, you need to install the module. We ship exclusively through npm, so you need that installed and then add @xterm/xterm as a dependency by running:
npm install --save @xterm/xterm
The recommended way to load xterm.js with the ES module syntax, either using TypeScript or a modern JS tooling. Note that both CommonJS and ES module files are shipped with the npm package.
import { Terminal } from '@xterm/xterm';