WRAPCODERS

GeoSales Sales Territory Map

Dashboards 6

About

Production-ready sales territory management and route visualization dashboard component for React featuring vector world projection, pulsing territory node badges, flight arc connections, searchable seller drawer, and performance analytics.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds GeoSales Sales Territory Map to your project and fits it to your theme.

Code

How GeoSales Sales Territory Map is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

import { useState, useEffect } from "react";
import SalesTerritoryMap from "@/components/ui/sales-territory-map";
import { Sun, Moon, Laptop, Maximize2, ExternalLink } from "lucide-react";

const REFERRAL_URL = "https://21st.dev/?ref=mdruhulhasan";

export default function SalesTerritoryMapDemo() {
  const [deviceFrame, setDeviceFrame] = useState(true);
  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 dark for GeoSales SaaS map
    }
    return true;
  });

  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={
        isDark
          ? "relative min-h-screen w-full bg-[#090b0e] text-neutral-100 transition-colors duration-200 flex flex-col justify-center items-center py-3 px-3 sm:px-6"
          : "relative min-h-screen w-full bg-neutral-100 text-neutral-900 transition-colors duration-200 flex flex-col justify-center items-center py-3 px-3 sm:px-6"
      }
    >
      {/* Top Floating Control Bar */}
      <div className="w-full max-w-5xl flex items-center justify-between mb-2.5 z-30">
        <div className="flex items-center gap-2">
          <a
            href={REFERRAL_URL}
            target="_blank"
            rel="noopener noreferrer"
            className="inline-flex items-center gap-1.5 px-3 py-1 rounded-full border border-emerald-500/30 bg-emerald-500/10 hover:bg-emerald-500/20 text-xs font-semibold text-emerald-400 transition shadow-sm"
          >
            <span>21st.dev Component</span>
            <ExternalLink className="w-3 h-3" />
          </a>
        </div>

        <div className="flex items-center gap-2">
          <button
            type="button"
            onClick={() => setDeviceFrame((prev) => !prev)}
            className={
              isDark
                ? "inline-flex h-7.5 items-center gap-1.5 rounded-xl border border-white/10 bg-white/5 hover:bg-white/10 px-3 text-xs font-medium text-neutral-200 transition"
                : "inline-flex h-7.5 items-center gap-1.5 rounded-xl border border-neutral-300 bg-white hover:bg-neutral-50 px-3 text-xs font-medium text-neutral-700 transition shadow-2xs"
            }
          >
            {deviceFrame ? (
              <>
                <Maximize2 className="h-3.5 w-3.5 text-neutral-400" />
                <span className="hidden sm:inline">Raw View</span>
              </>
            ) : (
              <>
                <Laptop className="h-3.5 w-3.5 text-neutral-400" />
                <span className="hidden sm:inline">Tablet View</span>
              </>
            )}
          </button>

          <button
            type="button"
            onClick={toggleTheme}
            className={
              isDark
                ? "inline-flex h-7.5 items-center gap-1.5 rounded-xl border border-white/10 bg-white/5 hover:bg-white/10 px-3 text-xs font-medium text-neutral-200 transition"
                : "inline-flex h-7.5 items-center gap-1.5 rounded-xl border border-neutral-300 bg-white hover:bg-neutral-50 px-3 text-xs font-medium text-neutral-700 transition shadow-2xs"
            }
            aria-label={`Switch to ${isDark ? "light" : "dark"} mode`}
          >
            {isDark ? (
              <>
                <Sun className="h-3.5 w-3.5 text-amber-400" />
                <span className="hidden sm:inline">Light</span>
              </>
            ) : (
              <>
                <Moon className="h-3.5 w-3.5 text-neutral-500" />
                <span className="hidden sm:inline">Dark</span>
              </>
            )}
          </button>
        </div>
      </div>

      {/* Main Component Presentation */}
      <main className="w-full max-w-5xl">
        <SalesTerritoryMap
          deviceFrame={deviceFrame}
          referralUrl={REFERRAL_URL}
        />
      </main>
    </div>
  );
}

Dependencies

More by WRAPCODERS

View all
  • Product Hover Showcase

    Product Hover Showcase

    89
  • Real Estate 3D Hero

    Real Estate 3D Hero

    50
  • Metric Trend Chart

    Metric Trend Chart

    35
  • LoopAI CRM

    LoopAI CRM

    32
  • Flash Technologies Crypto Wallet Hero

    Flash Technologies Crypto Wallet Hero

    23
  • AI Motion Visual Orb

    AI Motion Visual Orb

    21
  • TraceRocket Reports Dashboard

    TraceRocket Reports Dashboard

    20
  • Client Management CRM Hub

    Client Management CRM Hub

    19

More in Dashboards

View all
  • Creator Dashboard

    Creator Dashboard

    94
  • serf dashboard

    serf dashboard

    83
  • Dashboard with Collapsible Sidebar

    Dashboard with Collapsible Sidebar

    2.6K
  • Glass Dashboard

    Glass Dashboard

    1.1K
  • Adjustable Glass Dashboard

    Adjustable Glass Dashboard

    1.2K
  • App Dashboard Layout

    App Dashboard Layout

    572
  • Sidebar

    Sidebar

    422
  • Stat Card

    Stat Card

    78

Explore more

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