GitHub's profile imagefasu.dev

Terminal

A simulated terminal component with animated command typing and output.

$

Installation

npx shadcn@latest add https://registry.fasu.dev/r/terminal.json

Usage

import { Terminal } from "@/components/terminal";
 
export default function Example() {
  return <Terminal commands={[
    {
      input: "npm i motion",
      output: "Installed motion",
    },
    {
      input: "npx shadcn@latest add https://registry.fasu.dev/r/terminal.json",
      output: "Installed terminal",
    }
  ]} />
}

Props

type Props = {
  commands: {
    input: string;
    output?: string | string[];
  }

Dependencies

This component depends on:

  • motion

On this page