Console Output

Scrollable Tailwind console panel in monospace that prints log, warn and error lines with level labels. Uses a log role and is keyboard focusable.

src/registry/ui/console-output.tsx/r/console-output.json

Installation#

bash
npx shadcn@latest add @minidev/console-output

MiniDev UI is in the shadcn registry directory, so the short form works with no setup. Older CLI versions can use the full URL: npx shadcn@latest add https://ui.minidev.pro/r/console-output.json

Usage#

tsx
import { ConsoleOutput } from "@/components/ui/console-output"

export function Example() {
  return (
    <ConsoleOutput lines={[{ text: "ready on :3000" }, { level: "warn", text: "deprecated API" }, { level: "error", text: "failed to fetch" }]} />
  )
}

API reference#

ConsoleOutput props
PropTypeDefault
linesLine[][]
classNamestring-

Examples#

All Developer tool UI components for React