# 8-bit Timeline 1

> Vertical timeline with connecting line.

A shadcn/ui block from the [@8bitcn](https://www.8bitcn.com) registry, listed on [shadcn.exchange](https://shadcn.exchange/r/8bitcn/timeline1).

- Page, with a live preview: https://shadcn.exchange/r/8bitcn/timeline1
- Screenshot: https://abzjhwgwpdpz7ua5.public.blob.vercel-storage.com/shots/8bitcn/timeline1-light-5c72061332f411de.png
- Registry item: https://www.8bitcn.com/r/timeline1.json
- Categories: timeline
- Listed: 2026-10-13, source last changed 2026-10-13

## Install

```bash
npx shadcn@latest add https://www.8bitcn.com/r/timeline1.json
```

Run it in a project that has shadcn/ui set up. It adds the files below and installs what they depend on.

## Dependencies

- Registry items: `badge`

## Files

### `components/ui/8bit/blocks/timeline1.tsx`

```tsx
import type { ReactNode } from "react";

import { cn } from "@/lib/utils";

import { Badge } from "@/components/ui/8bit/badge";

import "@/components/ui/8bit/styles/retro.css";

export interface TimelineStep {
  badge?: string;
  description: string;
  icon: ReactNode;
  title: string;
}

interface Timeline1Props {
  className?: string;
  description?: string;
  steps?: TimelineStep[];
  title?: string;
}

const defaultSteps: TimelineStep[] = [
  {
    icon: "01",
    title: "Install",
    description: "One command. Components copied to your project. No runtime dependency.",
  },
  {
    icon: "02",
    title: "Customize",
    description: "Change colors, borders, fonts. Everything is yours to modify.",
    badge: "EASY",
  },
  {
    icon: "03",
    title: "Build",
    description: "Combine blocks into full pages. Hero, features, pricing — all ready.",
  },
  {
    icon: "04",
    title: "Ship",
    description: "Deploy your retro masterpiece. Watch the compliments roll in.",
  },
];

export default function Timeline1({
  title = "How It Works",
  description = "From zero to retro in four steps",
  steps = defaultSteps,
  className,
}: Timeline1Props) {
  return (
    <section className={cn("w-full px-4 py-16", className)}>
      <div className="mx-auto max-w-2xl">
        {(title || description) && (
          <div className="mb-10 text-center">
            {title && (
              <h2 className="retro mb-3 font-bold text-2xl tracking-tight md:text-3xl">
                {title}
              </h2>
            )}
            {description && (
              <p className="retro text-muted-foreground text-[9px]">{description}</p>
            )}
          </div>
        )}

        <div className="relative">
          {/* Vertical line */}
          <div className="absolute top-0 bottom-0 left-7 w-0 border-l-2 border-dashed border-border" />

          <div className="flex flex-col gap-8">
            {steps.map((step, idx) => (
              <div className="relative flex gap-6" key={step.title}>
                {/* Step number */}
                <div className="retro relative z-10 flex size-14 shrink-0 items-center justify-center border-2 border-primary bg-background text-xl font-bold">
                  {step.icon}
                </div>

                {/* Content */}
                <div className="pt-2">
                  <div className="flex items-center gap-4">
                    <h3 className="retro font-bold text-sm">{step.title}</h3>
                    {step.badge && (
                      <Badge className="text-[9px]">{step.badge}</Badge>
                    )}
                  </div>
                  <p className="mt-1 text-muted-foreground retro text-[9px] leading-relaxed">
                    {step.description}
                  </p>
                </div>
              </div>
            ))}
          </div>
        </div>
      </div>
    </section>
  );
}
```

### `components/ui/8bit/styles/retro.css`

```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/badge.tsx`

```tsx
import { type VariantProps, cva } from "class-variance-authority";

import { cn } from "@/lib/utils";

import { Badge as ShadcnBadge } from "@/components/ui/badge";

export const badgeVariants = cva("", {
  variants: {
    font: {
      normal: "",
      retro: "retro",
    },
    variant: {
      default: "border-primary bg-primary",
      destructive: "border-destructive bg-destructive",
      outline: "border-background bg-background",
      secondary: "border-secondary bg-secondary",
    },
  },
  defaultVariants: {
    variant: "default",
  },
});

export interface BitButtonProps
  extends React.ButtonHTMLAttributes<HTMLButtonElement>,
    VariantProps<typeof badgeVariants> {
  asChild?: boolean;
}

function Badge({
  children,
  className = "",
  font,
  variant,
  ...props
}: BitButtonProps) {
  const color = badgeVariants({ variant, font });

  const classes = className.split(" ");

  // visual classes for badge and sidebars
  const visualClasses = classes.filter(
    (c) =>
      c.startsWith("bg-") ||
      c.startsWith("border-") ||
      c.startsWith("text-") ||
      c.startsWith("rounded-")
  );

  // Container should accept all non-visual utility classes (e.g., size, spacing, layout)
  const containerClasses = classes.filter(
    (c) =>
      !(
        c.startsWith("bg-") ||
        c.startsWith("border-") ||
        c.startsWith("text-") ||
        c.startsWith("rounded-")
      )
  );

  return (
    <div className={cn("relative inline-flex items-stretch", containerClasses)}>
      <ShadcnBadge
        {...props}
        className={cn(
          "h-full",
          "rounded-none",
          "w-full",
          font !== "normal" && "retro",
          visualClasses
        )}
        variant={variant}
      >
        {children}
      </ShadcnBadge>

      {/* Left pixel bar */}
      <div
        className={cn(
          "-left-1.5 absolute inset-y-[4px] w-1.5",
          color,
          visualClasses
        )}
      />
      {/* Right pixel bar */}
      <div
        className={cn(
          "-right-1.5 absolute inset-y-[4px] w-1.5",
          color,
          visualClasses
        )}
      />
    </div>
  );
}

export { Badge };
```
