Skip to content

NewMCP server for your coding agent. Set it up ›

Nexus UI
Get Pro

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.

you@nexus: ~

Click in and type help.

Props

PropTypeDefaultWhat it does
commands3-command demoScript typed and run in order: { input, output?, runDelayMs? }. Visitors can run these again by typing them.
autoplayfalseLoops the script until someone clicks or types in the terminal, then hands them the prompt.
interactivetrueLets visitors type real commands after the script or their first click.
onCommand—Answers a typed command. Return lines to print, or nothing to fall back to the built-ins.
theme"carbon"Window style. Paper is light on light pages and turns dark with the site.
username"you"Username in the title bar and for whoami.
hostname"nexus"Hostname in the prompt and title bar.
promptSymbol"➜"Prompt symbol before each command.
typingSpeed34Base typing speed in ms per character.
typingJitter30Random extra ms per character.
startupDelay450Pause before the script starts, in ms.
delayBetweenCommands750Pause after each command, in ms.
autoStarttrueRuns the script once when it scrolls into view.
loopfalseRepeats the script forever.
loopDelay1600Pause between loops, in ms.
showCursortrueShows the caret.
enableSoundtruePlays 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—Your own OGG sprite for the key sounds. Without it the terminal uses the shared typing sound.
soundSpriteConfigUrl—JSON timing map for the sprite.
simpleSoundUrl—One audio file played on every key instead of a sprite.
showSoundToggletrueShows the sound button in the title bar.
showControlstrueShows pause, resume and replay in the title bar.
fillHeightfalseFills a parent with a fixed height instead of the default 300px body.
hint"Click in and type help."Line under the window. Empty string hides it.
className—Extra classes for the root.

Add it to your project

  1. 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 creates components.json and the cn() helper in src/lib/utils.ts:

    npx shadcn@latest init -d

    Starting from nothing? The Quick Start walks through the whole thing.

  2. 2

    Connect the registry

    Run this once per project. It writes the Nexus UI entry into components.json for 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.

  1. 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
  2. 4

    Check what was added

    With a project made as in the Quick Start (a src/ folder), these files land in it:

    components/
    terminal.tsx
    terminal/
    index.ts
    sprite-audio.ts
    terminal.tsx
  3. 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:

  4. 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