WRAPCODERS

GeoSales Sales Territory Map

Dashboards

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

    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

More in Dashboards

View all
  • serf dashboard

    serf dashboard

    34
  • Dashboard with Collapsible Sidebar

    Dashboard with Collapsible Sidebar

    2.6K
  • Glass Dashboard

    Glass Dashboard

    675
  • Adjustable Glass Dashboard

    Adjustable Glass Dashboard

    1.1K
  • Dashboard Shell

    Dashboard Shell

    193
  • Stat Card

    Stat Card

    69
  • App Dashboard Layout

    App Dashboard Layout

    540
  • Chart Component

    Chart Component

    28

Explore more

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