/
1.1k
Sponsor

Embedded Terminal

Embedded PTY terminal panel (requires node-pty peer)

Terminal

Installation

$ pnpm dlx shadcn@latest add @termcn/ink/embedded-terminal

Usage

import { EmbeddedTerminal } from "@/components/ui/embedded-terminal";
<EmbeddedTerminal
  command="bash"
  args={["-c", "echo Hello world"]}
  width={80}
  height={24}
  onExit={(code) => console.log(`Exited with ${code}`)}
/>

API Reference

EmbeddedTerminal

PropTypeDefault
commandstringrequired
argsstring[][]
cwdstring-
widthnumber80
heightnumber24
onExit(code: number) => void-

width is the preferred maximum. The component clamps itself to the current Ink stdout width and resizes the PTY without restarting the running process.

Notes

Accessibility

termcn exposes the following behavior through Ink's terminal accessibility APIs. This is not a browser ARIA or general WCAG-conformance claim.

  • Screen reader: Screen-reader mode removes decorative output while preserving meaningful labels and state.