Interactive Terminal, animated React component
A macOS-style terminal window that types a script of commands with human timing, shows a spinner while each runs and prints its output. Then the prompt is yours: click in and type help, ls, echo or any scripted command, with history, Tab completion and Ctrl+C.
- Free
- Motion Effects
- Spring
Types with a key click for every character, in sync with the text. The click stays off until you switch it on.
Carbon
Paper
Like Interactive Terminal? 256 more are in Pro.
Pro unlocks all 256 Pro components, every template and block, and everything we release next. Interactive Terminal stays free.
Play with it
Move the controls and watch it change. Copy code gives you a snippet with only the props you changed.
Click in and type help.
Props
| Prop | Type | Default | What it does |
|---|---|---|---|
| commands | TerminalCommand[] | 3-command demo | Script typed and run in order: { input, output?, runDelayMs? }. Visitors can run these again by typing them. |
| autoplay | boolean | false | Loops the script until someone clicks or types in the terminal, then hands them the prompt. |
| interactive | boolean | true | Lets visitors type real commands after the script or their first click. |
| onCommand | (input: string) => TerminalOutput | void | — | Answers a typed command. Return lines to print, or nothing to fall back to the built-ins. |
| theme | "carbon" | "midnight" | "paper" | "carbon" | Window style. Paper is light on light pages and turns dark with the site. |
| username | string | "you" | Username in the title bar and for whoami. |
| hostname | string | "nexus" | Hostname in the prompt and title bar. |
| promptSymbol | string | "➜" | Prompt symbol before each command. |
| typingSpeed | number | 34 | Base typing speed in ms per character. |
| typingJitter | number | 30 | Random extra ms per character. |
| startupDelay | number | 450 | Pause before the script starts, in ms. |
| delayBetweenCommands | number | 750 | Pause after each command, in ms. |
| autoStart | boolean | true | Runs the script once when it scrolls into view. |
| loop | boolean | false | Repeats the script forever. |
| loopDelay | number | 1600 | Pause between loops, in ms. |
| showCursor | boolean | true | Shows the caret. |
| enableSound | boolean | true | Plays a key click for every character typed, in sync. It follows the typing sound switch and the site sound switch, so it is silent until a visitor turns sound on. Pass false to silence this terminal. |
| soundSpriteUrl | string | — | Your own OGG sprite for the key sounds. Without it the terminal uses the shared typing sound. |
| soundSpriteConfigUrl | string | — | JSON timing map for the sprite. |
| simpleSoundUrl | string | — | One audio file played on every key instead of a sprite. |
| showSoundToggle | boolean | true | Shows the sound button in the title bar. |
| showControls | boolean | true | Shows pause, resume and replay in the title bar. |
| fillHeight | boolean | false | Fills a parent with a fixed height instead of the default 300px body. |
| hint | string | "Click in and type help." | Line under the window. Empty string hides it. |
| className | string | — | Extra classes for the root. |
Add it to your project
- 1
Set up your project once
You need a Next.js project with Tailwind CSS and the
@/import alias. In its root folder, run this once. It createscomponents.jsonand thecn()helper insrc/lib/utils.ts:npx shadcn@latest init -d
Starting from nothing? The Quick Start walks through the whole thing.
- 2
Connect the registry
Run this once per project. It writes the Nexus UI entry into
components.jsonfor you:npx shadcn@latest registry add "@nexus-labs=https://www.nexus-ui.com/api/registry/{name}"Type it exactly as shown.
{name}is filled in by the CLI with the component you ask for, so you never replace it.
- 3
Add the component
Run this from your project root. It adds the component, the helpers it imports and its npm packages.
npx shadcn@latest add @nexus-labs/terminal
- 4
Check what was added
With a project made as in the Quick Start (a
src/folder), these files land in it:components/terminal.tsxterminal/index.tssprite-audio.tsterminal.tsx - 5
Copying by hand? Skip the registry
Instead of steps 2 and 3 you can copy the files yourself, with no registry and no API key. Step 1 still applies, so that
cn()exists. Install the packages:npm install framer-motion
Then show the source and create each file at the path it gives:
- 6
Use it in a page
Installing only adds the files. Import the component in a page and render it. The Usage tab on the preview shows a fuller example with props:
// src/app/page.tsx import { Terminal } from "@/components/terminal"; export default function Page() { return ( <main> <Terminal /> </main> ); }
Like Interactive Terminal? 256 more are in Pro.
Pro unlocks all 256 Pro components, every template and block, and everything we release next. Interactive Terminal stays free.
About Interactive Terminal
The Interactive Terminal is a React component that simulates a CLI interface with animated command execution and sequential output streaming. Commands animate in with a typewriter effect and output lines stream into the terminal one by one. Custom commands, multi-line output, and a configurable prompt are all supported. Add it to developer tool landing pages and documentation to demonstrate CLI workflows without running actual shell sessions.
Good for
- CLI tool and developer tool demos
- Installation guide step illustrations
- API and SDK documentation examples
- DevOps and infrastructure tool landing pages