Componenteditors0.9 KB gzipZero dependencies
Console Panel
Console panel: colored output lines, input row, autoscroll.
Preview
Live Preview
Installation
Tokens guide →Add to your project via CLI (zero dependencies, code you own):
npx bigbullui add console-panelOr install the full npm package:
npm install bigbulluiUsage
tsx3 lines
import { ConsolePanel } from "@/components/ui/console-panel"; <ConsolePanel />Source code
console-panel.tsx + 1 helperZero third-party dependencies (2 local files shown in tabs below).
tsxconsole-panel.tsx78 lines
"use client"; import * as React from "react";import { cn } from "./lib/utils"; export interface ConsoleLine { id: string; text: string; tone?: "input" | "output" | "error" | "accent";} export interface ConsolePanelProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "onSubmit"> { lines: ConsoleLine[]; prompt?: string; onSubmit?: (command: string) => void;} /** Interactive console panel: terminal logs + command prompt. */Props
Interactive Prop Playground
Tweak parsed AST props below to generate ready-to-paste JSX.
tsx3 lines
import { ConsolePanel } from "@/components/ui/console-panel"; <ConsolePanel />| Prop | Type | Description |
|---|---|---|
| lines | ConsoleLine[] | Configures lines. (Default: []) |
| prompt | string | Configures prompt. (Default: ">") |
| onSubmit | (command: string) => void | Callback invoked on submit. |