# xterm-addon-canvas

> An addon for [xterm.js](https://github.com/xtermjs/xterm.js) that enables a canvas-based renderer using a 2d context to draw. This addon requires xterm.js v5+.

Latest version **0.5.0** (published 2023-09-07) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install xterm-addon-canvas
pnpm add xterm-addon-canvas
yarn add xterm-addon-canvas
bun add xterm-addon-canvas
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.5.0 |
| Published | 2023-09-07 |
| First published | 2022-07-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 509.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 21356 |
| Author | The xterm.js authors |
| Maintainers | tyriar |
| Keywords | terminal, canvas, xterm, xterm.js |

## Links

- npm: https://www.npmjs.com/package/xterm-addon-canvas
- Repository: https://github.com/xtermjs/xterm.js
- Homepage: https://github.com/xtermjs/xterm.js#readme
- Issues: https://github.com/xtermjs/xterm.js/issues
- npm.io page: https://npm.io/package/xterm-addon-canvas

## Alternatives

- [localforage](https://npm.io/package/localforage.md) — 6.2M weekly downloads
- [localforage-observable](https://npm.io/package/localforage-observable.md) — 30.8K weekly downloads
- [@y/y](https://npm.io/package/@y/y.md) — 30.1K weekly downloads
- [@metaobjectsdev/render](https://npm.io/package/@metaobjectsdev/render.md) — 3.5K weekly downloads
- [@ledgerhq/coin-algorand](https://npm.io/package/@ledgerhq/coin-algorand.md) — 1.1K weekly downloads

## Recent versions

- 0.5.0 (latest) — 2023-09-07
- 0.6.0-beta.37 (beta) — 2023-10-31
- 0.6.0-beta.36 — 2023-10-31
- 0.6.0-beta.35 — 2023-10-30
- 0.6.0-beta.34 — 2023-10-19
- 0.6.0-beta.33 — 2023-10-19
- 0.6.0-beta.32 — 2023-10-17
- 0.6.0-beta.31 — 2023-10-13
- 0.6.0-beta.30 — 2023-10-02
- 0.6.0-beta.29 — 2023-10-02
- 0.6.0-beta.28 — 2023-09-27
- 0.6.0-beta.27 — 2023-09-20
- 0.6.0-beta.26 — 2023-09-20
- 0.6.0-beta.25 — 2023-09-16
- 0.6.0-beta.24 — 2023-09-15
- … 142 more at https://npm.io/package/xterm-addon-canvas/versions

## README

## xterm-addon-canvas

An addon for [xterm.js](https://github.com/xtermjs/xterm.js) that enables a canvas-based renderer using a 2d context to draw. This addon requires xterm.js v5+.

The purpose of this addon is to be used as a fallback for the [webgl addon](https://www.npmjs.com/package/xterm-addon-webgl) when better performance is desired over the default DOM renderer, but WebGL2 isn't supported or performant for some reason.

### Install

```bash
npm install --save xterm-addon-canvas
```

### Usage

```ts
import { Terminal } from 'xterm';
import { CanvasAddon } from 'xterm-addon-canvas';

const terminal = new Terminal();
terminal.open(element);
terminal.loadAddon(new CanvasAddon());
```

See the full [API](https://github.com/xtermjs/xterm.js/blob/master/addons/xterm-addon-canvas/typings/xterm-addon-canvas.d.ts) for more advanced usage.

### See also

- [xterm-addon-webgl](https://www.npmjs.com/package/xterm-addon-webgl) A renderer for xterm.js that uses WebGL

---
_Source: https://npm.io/package/xterm-addon-canvas · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
