Entry points
terminosaurus/xterm
Terminosaurus provides a simple XTerm.js integration which we use on this very website. It's exposed here for convenience.
<XTerm/>
Creates an XTerm.js terminal that renders anything written to the stdout stream and sends anything typed into the terminal to the stdin stream. The terminal will have a variable amount of columns depending on its container, and a fixed amount of rows.
interface XTermProps {
stdinXTermProps.stdin: XTermScreenIn: XTermScreenIntype XTermScreenIn = ScreenIn & {
write: (data: string) => void;
};
stdoutXTermProps.stdout: XTermScreenOut: XTermScreenOuttype XTermScreenOut = ScreenOut & {
emit: (event: string) => void;
on: (event: string, cb: Function) => void;
off: (event: string, cb: Function) => void;
};
rowsXTermProps.rows?: number | undefined?: number;
}