Skip to content

Latest commit

 

History

History
34 lines (26 loc) · 791 Bytes

File metadata and controls

34 lines (26 loc) · 791 Bytes

One Terminal a lightweight, themeable terminal component for React.

Usage

To start using the library, install it in your project:

npm install one-terminal

Define your virtual file system and add it to the page where you want your terminal to be rendered.

import { Terminal } from "one-terminal";

// Define your virtual file system
const vfs = {
  kind: "directory",
  entries: {
    readme: {
      kind: "file",
      fileType: "text",
      content: "Welcome to One Terminal 👋",
    },
  },
} as const;

export default function App() {
  return <Terminal fileStructure={vfs} />;
}

Documentation

Find the full API reference in the documentation.