@lifo-sh/ui
v0.5.0
Published
Terminal UI for Lifo -- xterm.js wrapper with WebGL rendering
Readme
@lifo-sh/ui
Terminal UI package for Lifo -- a Linux-like OS that runs natively in the browser. Wraps xterm.js with WebGL rendering and auto-fit.
Install
npm install @lifo-sh/ui @lifo-sh/coreUsage
Typically used via @lifo-sh/core's Sandbox API:
import { Sandbox } from '@lifo-sh/core';
const sandbox = await Sandbox.create({
terminal: '#terminal-container',
});@lifo-sh/core lazy-loads @lifo-sh/ui when a DOM element is passed as the terminal option.
Standalone
import { Terminal } from '@lifo-sh/ui';
const terminal = new Terminal(document.getElementById('terminal'));
terminal.write('Hello from Lifo!\r\n');What's Included
- xterm.js terminal emulator
- WebGL renderer for GPU-accelerated rendering
- Auto-fit addon for responsive sizing
- Implements the
ITerminalinterface from@lifo-sh/core
Packages
| Package | Description | |---|---| | @lifo-sh/core | Kernel, shell, commands, sandbox API | | @lifo-sh/ui | Terminal UI (xterm.js wrapper) | | lifo-sh | CLI -- run Lifo in your terminal |
Links
License
MIT
