WRAPCODERS

GTA VI Vice City Radio

Component

About

Interactive GTA VI Vice City radio player with station carousel, live audio spectrum equalizer HUD, and on-demand episodes.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds GTA VI Vice City Radio to your project and fits it to your theme.

Code

How GTA VI Vice City Radio is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

import { useState, useEffect } from "react";
import GtaRadioPlayer, { DEFAULT_STATIONS, DEFAULT_EPISODES } from "@/components/ui/gta-radio-player";
import { Sun, Moon, ExternalLink, Radio, Disc, Volume2, Shield } from "lucide-react";

export default function GtaRadioDemo() {
  const [isDark, setIsDark] = useState<boolean>(() => {
    if (typeof window !== "undefined") {
      const params = new URLSearchParams(window.location.search);
      const themeParam = params.get("theme");
      if (themeParam === "dark") return true;
      if (themeParam === "light") return false;
      return true; // Default to dark mode for GTA Vice City aesthetics
    }
    return true;
  });

  // Sync dark class on mount and theme state changes
  useEffect(() => {
    if (typeof document !== "undefined") {
      if (isDark) {
        document.documentElement.classList.add("dark");
      } else {
        document.documentElement.classList.remove("dark");
      }
    }
  }, [isDark]);

  const toggleTheme = () => {
    setIsDark((prev) => !prev);
  };

  return (
    <div className="relative min-h-screen bg-background text-foreground transition-colors duration-200">
      {/* Background Ambience Gradient */}
      <div className="pointer-events-none fixed inset-0 overflow-hidden">
        <div className="absolute -top-40 left-1/4 h-96 w-96 rounded-full bg-pink-500/10 blur-[120px]" />
        <div className="absolute top-1/3 -right-20 h-96 w-96 rounded-full bg-cyan-500/10 blur-[120px]" />
        <div className="absolute -bottom-20 left-1/3 h-96 w-96 rounded-full bg-amber-500/10 blur-[120px]" />
      </div>

      {/* Floating Theme Switcher & Referral Pill */}
      <div className="fixed bottom-4 right-4 z-50 flex items-center gap-3 rounded-full border border-border bg-card/90 px-3.5 py-1.5 shadow-xl backdrop-blur-md">
        <a
          href="https://21st.dev/?ref=mdruhulhasan"
          target="_blank"
          rel="noopener noreferrer"
          className="text-xs font-medium text-muted-foreground hover:text-primary transition-colors duration-150 flex items-center gap-1"
        >
          <span>Component for</span>
          <span className="font-semibold text-foreground">21st.dev</span>
          <ExternalLink className="h-3 w-3" />
        </a>

        <span className="h-3 w-px bg-border/80" aria-hidden="true" />

        <button
          type="button"
          onClick={toggleTheme}
          className="flex items-center gap-1.5 text-xs font-medium text-foreground hover:text-primary transition-colors cursor-pointer"
          aria-label={isDark ? "Switch to light mode" : "Switch to dark mode"}
        >
          {isDark ? (
            <>
              <Sun className="h-3.5 w-3.5 text-amber-500" />
              <span>Light Mode</span>
            </>
          ) : (
            <>
              <Moon className="h-3.5 w-3.5 text-indigo-500" />
              <span>Dark Mode</span>
            </>
          )}
        </button>
      </div>

      {/* Hero Showcase Wrapper */}
      <div className="relative z-10 px-4 py-8 sm:py-12 md:py-16">
        {/* Top Header Introduction */}
        <div className="max-w-4xl mx-auto mb-10 text-center">
          <div className="inline-flex items-center gap-2 rounded-full border border-primary/30 bg-primary/10 px-3.5 py-1 text-xs font-semibold text-primary mb-3">
            <Radio className="h-3.5 w-3.5" />
            <span>Interactive Game Audio System</span>
          </div>

          <h1 className="text-3xl sm:text-5xl font-black tracking-tight text-foreground">
            GTA VI Vice City Radio
          </h1>

          <p className="mt-3 text-sm sm:text-base text-muted-foreground max-w-xl mx-auto">
            Interactive radio station carousel with L1/R1 bumpers, live audio visualizer HUD, 
            and curated on-demand episodes from the Leonida sound network.
          </p>
        </div>

        {/* The Component Instance */}
        <div className="w-full">
          <GtaRadioPlayer
            initialStationId="flash-fm"
            stations={DEFAULT_STATIONS}
            episodes={DEFAULT_EPISODES}
            referralUrl="https://21st.dev/?ref=mdruhulhasan"
          />
        </div>

        {/* Feature Highlights Grid for 21st.dev Community */}
        <div className="max-w-5xl mx-auto mt-16 grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4">
          <div className="rounded-xl border border-border bg-card/60 p-4 backdrop-blur-sm">
            <div className="flex items-center gap-2 text-primary font-bold text-sm mb-1">
              <Disc className="h-4 w-4" />
              <span>Station Carousel</span>
            </div>
            <p className="text-xs text-muted-foreground">
              Gamepad L1 and R1 bumper navigation, smooth Framer Motion transitions and quick station selectors.
            </p>
          </div>

          <div className="rounded-xl border border-border bg-card/60 p-4 backdrop-blur-sm">
            <div className="flex items-center gap-2 text-primary font-bold text-sm mb-1">
              <Volume2 className="h-4 w-4" />
              <span>Live Equalizer HUD</span>
            </div>
            <p className="text-xs text-muted-foreground">
              20-band audio spectrum analyzer, rotating vinyl turntable disk, DJ live quotes and audio filters.
            </p>
          </div>

          <div className="rounded-xl border border-border bg-card/60 p-4 backdrop-blur-sm">
            <div className="flex items-center gap-2 text-primary font-bold text-sm mb-1">
              <Radio className="h-4 w-4" />
              <span>On Demand Archive</span>
            </div>
            <p className="text-xs text-muted-foreground">
              Browse DJ mixes, crime scanner recordings, and host interviews with category and search filters.
            </p>
          </div>

          <div className="rounded-xl border border-border bg-card/60 p-4 backdrop-blur-sm">
            <div className="flex items-center gap-2 text-primary font-bold text-sm mb-1">
              <Shield className="h-4 w-4" />
              <span>Clean Design Tokens</span>
            </div>
            <p className="text-xs text-muted-foreground">
              Zero layout shifts, strictly scoped transitions, and native dark and light mode support.
            </p>
          </div>
        </div>
      </div>
    </div>
  );
}

Dependencies

More by WRAPCODERS

View all
  • Product Hover Showcase

    Product Hover Showcase

    75
  • Real Estate 3D Hero

    Real Estate 3D Hero

    45
  • Metric Trend Chart

    Metric Trend Chart

    34
  • AI Motion Visual Orb

    AI Motion Visual Orb

    16
  • Interactive 3D Hero Header

    Interactive 3D Hero Header

    16
  • Portfolio Projects Showcase

    Portfolio Projects Showcase

    14
  • AI SaaS Workflow Hero

    AI SaaS Workflow Hero

    11
  • Executive Pricing Plan

    Executive Pricing Plan

    10

Explore more

Part of Components — browse the full library on 21st.dev.