# xterm-tui

> Attach graphics to an xterm.js terminal using neo-blessed

Latest version **1.0.1** (published 2019-05-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install xterm-tui
pnpm add xterm-tui
yarn add xterm-tui
bun add xterm-tui
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2019-05-05 |
| First published | 2019-05-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 3.5 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 11 |
| Author | rangermauve |
| Maintainers | rangermauve |
| Keywords | xterm, tui, gui, blessed, ncurses, terminal |

## Links

- npm: https://www.npmjs.com/package/xterm-tui
- Repository: https://github.com/RangerMauve/xterm-tui
- Homepage: https://github.com/RangerMauve/xterm-tui#readme
- Issues: https://github.com/RangerMauve/xterm-tui/issues
- npm.io page: https://npm.io/package/xterm-tui

## Dependencies (3)

- [blessed](https://npm.io/package/blessed.md) ^0.1.81
- [term.js](https://npm.io/package/term.js.md) 0.0.7
- [blessed-contrib](https://npm.io/package/blessed-contrib.md) ^4.8.15

## 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

- 1.0.1 (latest) — 2019-05-05
- 1.0.0 — 2019-05-05

## README

# xterm-tui
Attach graphics to an [xterm.js](https://xtermjs.org/) terminal using blessed

```
<script src="//unpkg.com/xterm-tui/bundle.js"></script>
```

-- OR --

```
npm install --save xterm-tui

const XtermTUI = require('xterm-tui')
```

```js
const terminal = new Terminal()

const tui = new XtermTUI(terminal)

terminal.open(document.querySelector('main'))

const {widgets} = XtermTUI
const {Box} = widgets

const screen = tui.screen

// Create a box perfectly centered horizontally and vertically.
const box = Box({
  top: 'center',
  left: 'center',
  width: '50%',
  height: '50%',
  content: 'Hello {bold}world{/bold}!',
  tags: true,
  border: {
    type: 'line'
  },
  style: {
    fg: 'white',
    bg: 'magenta',
    border: {
      fg: '#f0f0f0'
    },
    hover: {
      bg: 'green'
    }
  }
});

// Append our box to the screen.
screen.append(box);

box.focus()

screen.render()
```

## Widgets

In addition to the default widgets in blessed, we also have the ones inside blessed-contrib

From [blessed](https://github.com/chjj/blessed)

- Base Nodes
    - Node (abstract)
    - Screen
    - Element (abstract)
- Boxes
    - Box
    - Text
    - Line
    - ScrollableBox (deprecated)
    - ScrollableText (deprecated)
    - BigText
- Lists
    - List
    - FileManager
    - ListTable
    - Listbar
- Forms
    - Form
    - Input (abstract)
    - Textarea
    - Textbox
    - Button
    - Checkbox
    - RadioSet
    - RadioButton
- Prompts
    - Prompt
    - Question
    - Message
    - Loading
- Data Display
    - ProgressBar
    - Log
    - Table
- Special Elements
    - Terminal
    - Image
    - ANSIImage
    - OverlayImage
    - Video
    - Layout


From [blessed-contrib](https://github.com/yaronn/blessed-contrib)

- Line Chart
- Bar Chart
- Stacked Bar Chart
- Map
- Gauge
- Stacked Gauge
- Donut
- LCD Display
- Rolling Log
- Picture
- Sparkline
- Table
- Tree
- Markdown

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