Installation
Vite
Start with the example or follow this guide:
npm install ink-web @xterm/xtermyarn add ink-web @xterm/xtermpnpm add ink-web @xterm/xtermbun add ink-web @xterm/xtermUsage:
"use client";
import { InkXterm, Box, Text } from "ink-web";
import "ink-web/css";
import "@xterm/xterm/css/xterm.css";
export const Terminal = () => (
<div style={{ width: "100vw", height: "100vh" }}>
<InkXterm focus>
<Box flexDirection="column">
<Text color="green">Hello from Ink!</Text>
</Box>
</InkXterm>
</div>
);
export default Terminal;