DDBS UI
effect

Wire Globe

A lightweight wireframe globe in plain SVG: rotating meridians and parallels, city markers that face front as it turns, and an emphasised marker. No WebGL or three.js.

npx shadcn@latest add https://ui.develop-better-solutions.com/r/wire-globe.json
Fullscreen
Casablanca

Usage

wire-globe-example.tsx
"use client";

import * as React from "react";
import { WireGlobe } from "@dbs/ui";

const CITIES = [
  { id: "cas", lat: 33.6, lng: -7.6, label: "Casablanca" },
  { id: "par", lat: 48.9, lng: 2.4, label: "Paris" },
  { id: "nyc", lat: 40.7, lng: -74, label: "New York" },
  { id: "dxb", lat: 25.2, lng: 55.3, label: "Dubai" },
  { id: "sin", lat: 1.3, lng: 103.8, label: "Singapore" },
  { id: "sao", lat: -23.5, lng: -46.6, label: "Sao Paulo" },
];

export default function WireGlobeExample() {
  const [active, setActive] = React.useState("cas");
  return (
    <div className="mx-auto w-full max-w-[420px] py-6">
      <WireGlobe markers={CITIES} activeId={active} onMarkerSelect={setActive} speed={10} />
    </div>
  );
}