https://github.com/rangermauve/xterm-tui
Attach graphics to an xterm.js terminal using neo-blessed
https://github.com/rangermauve/xterm-tui
Last synced: 15 days ago
JSON representation
Attach graphics to an xterm.js terminal using neo-blessed
- Host: GitHub
- URL: https://github.com/rangermauve/xterm-tui
- Owner: RangerMauve
- License: mit
- Created: 2019-05-04T19:35:41.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2019-05-05T02:20:30.000Z (about 6 years ago)
- Last Synced: 2025-04-20T16:18:11.138Z (about 1 month ago)
- Language: JavaScript
- Size: 4.88 KB
- Stars: 9
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# xterm-tui
Attach graphics to an [xterm.js](https://xtermjs.org/) terminal using blessed```
```
-- OR --
```
npm install --save xterm-tuiconst XtermTUI = require('xterm-tui')
``````js
const terminal = new Terminal()const tui = new XtermTUI(terminal)
terminal.open(document.querySelector('main'))
const {widgets} = XtermTUI
const {Box} = widgetsconst 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
- LayoutFrom [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