Skip to content

    Browse components

    Globe

    A rotating dotted globe drawn on canvas, with pulsing city markers, great-circle arcs carrying travelling light, drag-to-spin inertia and a soft atmosphere.

    Open
    Customize

    Installation

    npx shadcn@latest add @glint-ui/globe

    First time using @glint-ui? Add the registry to components.json once, or install by URL: npx shadcn@latest add https://glintui.vercel.app/r/globe.json

    Usage

    import { Globe } from "@/components/ui/globe";
    
    <Globe
      markers={[
        { lat: 37.77, lon: -122.42, label: "San Francisco" },
        { lat: 51.5, lon: -0.12, label: "London" },
        { lat: 35.68, lon: 139.69, label: "Tokyo" },
      ]}
      arcs={[[0, 1], [0, 2]]}
    />

    Props

    PropTypeDefaultDescription
    dotColorstring"#94a3b8"Land dot color.
    accentstring"#c6ff3d"Markers, arcs and atmosphere.
    speednumber8Auto-rotation, degrees per second.
    tiltnumber18Axial tilt in degrees.
    densitynumber12000Dots sampled over the sphere.
    showLabelsbooleanfalseCity labels on the front side.
    markersReactNode—`{ lat, lon, label? }[]`. Ships with ten world cities.
    arcsReactNode—`[fromIndex, toIndex][]` into `markers`.
    classNamestring—Extra classes for the root element.