# 8-bit Feature 2

> Step-by-step feature list with numbered icons and separators.

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

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

## Install

```bash
npx shadcn@latest add https://www.8bitcn.com/r/feature2.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`, `separator`

## Files

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

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

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

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

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

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

interface Feature2Props {
  className?: string;
  description?: string;
  items?: FeatureRow[];
  title?: string;
}

const defaultItems: FeatureRow[] = [
  {
    icon: "01",
    title: "Create Your Character",
    description:
      "Pick a class, customize your stats, and choose your starting gear. Every decision shapes your journey.",
  },
  {
    icon: "02",
    title: "Explore the World",
    description:
      "16 handcrafted biomes with secrets hidden in every corner. No procedural filler — just pure design.",
  },
  {
    icon: "03",
    title: "Battle Enemies",
    description:
      "Turn-based combat with a combo system that rewards skill. Chain attacks for devastating finishers.",
    badge: "ENHANCED",
  },
  {
    icon: "04",
    title: "Collect Loot",
    description:
      "Over 200 items to discover. Craft legendary weapons from rare drops found in the deepest dungeons.",
  },
];

export default function Feature2({
  title = "How It Works",
  description = "Four steps to retro glory",
  items = defaultItems,
  className,
}: Feature2Props) {
  return (
    <section className={cn("w-full px-4 py-16", className)}>
      <div className="mx-auto max-w-3xl">
        {(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="mx-auto max-w-xl retro text-muted-foreground text-[9px]">
                {description}
              </p>
            )}
          </div>
        )}

        <div className="flex flex-col">
          {items.map((item, index) => (
            <div key={item.title}>
              <div className="flex gap-6 py-6">
                {/* Icon / number */}
                <div className="retro flex size-14 shrink-0 items-center justify-center border-2 border-primary text-xl font-bold">
                  {item.icon}
                </div>

                {/* Text */}
                <div className="flex-1">
                  <div className="flex items-center gap-4">
                    <h3 className="retro font-bold text-sm">{item.title}</h3>
                    {item.badge && (
                      <Badge className="text-[9px]">{item.badge}</Badge>
                    )}
                  </div>
                  <p className="mt-2 text-muted-foreground retro text-[9px] leading-relaxed">
                    {item.description}
                  </p>
                </div>
              </div>
              {index < items.length - 1 && <Separator />}
            </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 };
```

### `components/ui/8bit/separator.tsx`

```tsx
"use client";

import type * as React from "react";

import * as SeparatorPrimitive from "@radix-ui/react-separator";

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

function Separator({
  className,
  orientation = "horizontal",
  decorative = true,
  ...props
}: React.ComponentProps<typeof SeparatorPrimitive.Root>) {
  return (
    <SeparatorPrimitive.Root
      data-slot="separator-root"
      decorative={decorative}
      orientation={orientation}
      className={cn(
        "data-[orientation=horizontal]:bg-[length:16px_8px] data-[orientation=horizontal]:bg-[linear-gradient(90deg,var(--foreground)_75%,transparent_75%)] dark:data-[orientation=horizontal]:bg-[linear-gradient(90deg,var(--ring)_75%,transparent_75%)] shrink-0 data-[orientation=horizontal]:h-0.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-0.5 data-[orientation=vertical]:bg-[length:2px_16px] data-[orientation=vertical]:bg-[linear-gradient(0deg,var(--foreground)_75%,transparent_75%)] dark:data-[orientation=vertical]:bg-[linear-gradient(0deg,var(--ring)_75%,transparent_75%)]",
        className
      )}
      {...props}
    />
  );
}

export { Separator };
```
