8bitcn UI
blockadvanced1source: ok · hit
8-bit Advanced 1
Fake terminal demo shell with command output.
npx shadcn add "https://www.8bitcn.com/r/advanced1.json"free
Visual style
terminal-mono
Tags auto-generated by rules on 9/24/2026 — empty means no evidence, not lack of support.
Dependencies
Bundle weight · lightRegistry dependencies
card
Files3 · source cached 10/9/2026, 6:46:52 PM
components/ui/8bit/blocks/advanced1.tsx
import { cn } from "@/lib/utils";
import {
Card,
CardContent,
CardHeader,
CardTitle,
} from "@/components/ui/8bit/card";
import "@/components/ui/8bit/styles/retro.css";
export interface TerminalLine {
color?: string;
text: string;
type: "input" | "output" | "comment";
}
interface Advanced1Props {
className?: string;
lines?: TerminalLine[];
title?: string;
}
const defaultLines: TerminalLine[] = [
{ type: "comment", text: "# Install 8bitcn components" },
{ type: "input", text: "pnpm dlx shadcn@latest add @8bitcn/button" },
{ type: "output", text: "Installing @8bitcn/button..." },
{ type: "output", text: "Created components/ui/8bit/button.tsx" },
{ type: "output", text: "Created components/ui/8bit/styles/retro.css" },
{ type: "output", text: "Done in 1.2s" },
{ type: "comment", text: "" },
{ type: "comment", text: "# Add a block" },
{ type: "input", text: "pnpm dlx shadcn@latest add @8bitcn/hero1" },
{ type: "output", text: "Installing @8bitcn/hero1..." },
{ type: "output", text: "Created components/ui/8bit/blocks/hero1.tsx" },
{ type: "output", text: "Done in 0.8s" },
];
function lineClass(type: TerminalLine["type"]): string {
if (type === "input") {
return "text-foreground";
}
if (type === "comment") {
return "text-muted-foreground";
}
return "text-muted-foreground/70";
}
function linePrefix(type: TerminalLine["type"]): string {
if (type === "input") {
return "> ";
}
return "";
}
export default function Advanced1({
title = "Terminal",
lines = defaultLines,
className,
}: Advanced1Props) {
return (
<section className={cn("w-full px-4 py-16", className)}>
<div className="mx-auto max-w-2xl">
<Card className="bg-background">
<CardHeader className="pb-2">
<div className="flex items-center gap-2">
<div className="flex gap-1.5">
<div className="size-2.5 bg-destructive" />
<div className="size-2.5 bg-yellow-500" />
<div className="size-2.5 bg-green-500" />
</div>
<CardTitle className="retro text-[10px] text-muted-foreground">
{title}
</CardTitle>
</div>
</CardHeader>
<CardContent>
<div className="space-y-0.5 [overflow-wrap:anywhere]">
{lines.map((line, idx) => (
<p
className={cn("retro text-[10px] leading-relaxed", lineClass(line.type))}
key={`${line.text}-${idx}`}
>
{linePrefix(line.type)}
{line.text}
</p>
))}
<p className="retro animate-pulse text-[10px] text-foreground">
{">"} _
</p>
</div>
</CardContent>
</Card>
</div>
</section>
);
}
components/ui/8bit/styles/retro.css
@import url("https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap");
.retro {
font-family:
"Press Start 2P",
system-ui,
-apple-system,
sans-serif;
line-height: 1.5;
letter-spacing: 0.5px;
}
.pixelated {
image-rendering: pixelated;
image-rendering: crisp-edges;
}components/ui/8bit/card.tsx
import { type VariantProps, cva } from "class-variance-authority";
import { cn } from "@/lib/utils";
import {
Card as ShadcnCard,
CardAction as ShadcnCardAction,
CardContent as ShadcnCardContent,
CardDescription as ShadcnCardDescription,
CardFooter as ShadcnCardFooter,
CardHeader as ShadcnCardHeader,
CardTitle as ShadcnCardTitle,
} from "@/components/ui/card";
import "@/components/ui/8bit/styles/retro.css";
export const cardVariants = cva("", {
variants: {
font: {
normal: "",
retro: "retro",
},
},
defaultVariants: {
font: "retro",
},
});
export interface BitCardProps
extends React.ComponentProps<"div">,
VariantProps<typeof cardVariants> {
asChild?: boolean;
}
function Card({ className, font, ...props }: BitCardProps) {
return (
<div
className={cn(
"relative bg-card text-card-foreground border-y-6 border-foreground dark:border-ring p-0!",
className
)}
>
<ShadcnCard
{...props}
className={cn(
"rounded-none border-0 w-full! h-full flex flex-col bg-card text-card-foreground shadow-none",
font !== "normal" && "retro",
className
)}
/>
<div
className={cn("absolute inset-0 border-x-6 -mx-1.5 border-inherit pointer-events-none")}
aria-hidden="true"
/>
</div>
);
}
function CardHeader({ ...props }: BitCardProps) {
const { className, font } = props;
return (
<ShadcnCardHeader
className={cn(font !== "normal" && "retro", className)}
{...props}
/>
);
}
function CardTitle({ ...props }: BitCardProps) {
const { className, font } = props;
return (
<ShadcnCardTitle
className={cn(font !== "normal" && "retro", className)}
{...props}
/>
);
}
function CardDescription({ ...props }: BitCardProps) {
const { className, font } = props;
return (
<ShadcnCardDescription
className={cn(font !== "normal" && "retro", className)}
{...props}
/>
);
}
function CardAction({ ...props }: BitCardProps) {
const { className, font } = props;
return (
<ShadcnCardAction
className={cn(font !== "normal" && "retro", className)}
{...props}
/>
);
}
function CardContent({ ...props }: BitCardProps) {
const { className, font } = props;
return (
<ShadcnCardContent
className={cn("flex-1", font !== "normal" && "retro", className)}
{...props}
/>
);
}
function CardFooter({ ...props }: BitCardProps) {
const { className, font } = props;
return (
<ShadcnCardFooter
data-slot="card-footer"
className={cn(font !== "normal" && "retro", className)}
{...props}
/>
);
}
export {
Card,
CardHeader,
CardFooter,
CardTitle,
CardAction,
CardDescription,
CardContent,
};