Utility
AI
Terminal
Embedded terminal requires Node.js and may not render in the browser preview.
Installation
pnpm dlx shadcn@latest add https://termcn.dev/r/embedded-terminal.json
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
| Prop | Type | Default |
|---|---|---|
command | string | required |
args | string[] | [] |
cwd | string | undefined |
width | number | 80 |
height | number | 24 |
onExit | (code: number) => void | undefined |