
Security News
/Research
Popular node-ipc npm Package Infected with Credential Stealer
Socket detected malicious node-ipc versions with obfuscated stealer/backdoor behavior in a developing npm supply chain attack.
react-linux-terminals
Advanced tools
Beautiful, themeable Linux-style terminal component for React apps.
A React component that renders a Linux-style terminal window with a macOS-like title bar, themeable colors, and optional typewriter animation. Perfect for portfolios, docs, or landing pages.

npm install react-linux-terminals
Peer dependencies: React 18 or 19.
import { Terminal, themes } from "react-linux-terminals";
function App() {
return (
<Terminal
theme={themes.ubuntu}
username="alice"
hostname="dev-box"
workingDirectory="~/projects"
commands={[
"ls -la",
{
input: "cat /etc/os-release",
output: ["PRETTY_NAME=\"Ubuntu 24.04 LTS\"", "NAME=\"Ubuntu\""],
},
]}
cursorBlink
typewriterEffect
showHeader
/>
);
}
Don’t forget to keep the default styles: the package ships CSS that is applied when you import the component (side-effect).
| Prop | Type | Default | Description |
|---|---|---|---|
theme | "ubuntu" | "arch" | "kali" or TerminalTheme | — | Preset name or custom theme object. |
commands | Array<string | CommandEntry> | [] | Commands to show. Strings = input only; objects can include output and isError. |
username | string | "user" | Username in the prompt. |
hostname | string | "localhost" | Hostname in the prompt. |
workingDirectory | string | "~" | Current path in the prompt. |
showPrompt | boolean | true | Show user@host:path$ before each command. |
showHeader | boolean | true | Show the window bar with red/yellow/green buttons. |
cursorBlink | boolean | true | Blink the cursor. |
typewriterEffect | boolean | false | Animate the last command character-by-character. |
typewriterSpeed | number | 40 | Delay per character (ms) when typewriterEffect is on. |
className | string | — | Extra class on the root element. |
style | React.CSSProperties | — | Inline styles on the root element. |
interface CommandEntry {
input: string; // The command line
output?: string[]; // Lines of output
isError?: boolean; // Style output as error (e.g. red)
}
Three built-in themes: Ubuntu, Arch, Kali.
import { Terminal, themes } from "react-linux-terminals";
// By name
<Terminal theme="ubuntu" commands={["neofetch"]} />
<Terminal theme={themes.arch} commands={["pacman -Syu"]} />
<Terminal theme={themes.kali} commands={["whoami"]} />
Optional subpath for themes only:
import { getTheme, themes } from "react-linux-terminals/themes";
const ubuntu = getTheme("ubuntu");
You can pass a full custom theme object (see TerminalTheme in the types) for your own colors and labels.
For custom UIs that need the same typing effect:
import { useTypewriter } from "react-linux-terminals";
const { displayedText, isTyping, reset } = useTypewriter({
text: "Hello, world!",
speed: 50,
autoStart: true,
});
# Build library → dist/
npm run build
# Build demo → preview/
npm run build:demo
# Serve demo at http://localhost:4173/demo.html
npm run demo:serve
# Type-check
npm run typecheck
See PUBLISH.md for publishing and npm link / unlink steps.
MIT
FAQs
Beautiful, themeable Linux-style terminal component for React apps.
We found that react-linux-terminals demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
/Research
Socket detected malicious node-ipc versions with obfuscated stealer/backdoor behavior in a developing npm supply chain attack.

Security News
TeamPCP and BreachForums are promoting a Shai-Hulud supply chain attack contest with a $1,000 prize for the biggest package compromise.

Security News
Packagist urges PHP projects to update Composer after a GitHub token format change exposed some GitHub Actions tokens in CI logs.