Installation
Get up and running in under a minute.
Install
terminal
bun add @trents/terminalOr use npm/yarn/pnpm — any package manager works.
Import Styles
The base stylesheet is required. The CRT stylesheet is optional — only import it if you want scanline/glow effects.
styles
// Required
import "@trents/terminal/styles.css"
// Optional — CRT scanline/glow/vignette effects
import "@trents/terminal/crt.css"Basic Usage
App.tsx
import { Terminal } from "@trents/terminal"
import "@trents/terminal/styles.css"
export default function App() {
return (
<Terminal
variant="dropdown"
hotkey="`"
welcomeMessage="Type 'help' for available commands."
/>
)
}This renders a dropdown terminal that opens with the backtick key. It includes all built-in commands out of the box.
TypeScript
All types are exported from the main entry point. No additional @types package needed.
types
import type {
Command,
CommandContext,
CommandResult,
TerminalHandle,
TerminalPlugin,
TerminalThemeConfig,
FsNode,
OutputSegment,
} from "@trents/terminal"