Ballmac UI home

Globe

An interactive WebGL dot globe (cobe) with markers, drag-to-spin momentum and arrow-key control. Colors come from theme tokens and repaint on theme change; starts lazily and pauses off-screen.

Live

Deployed to 35 regions

Every push runs close to your users, on every continent.

regions
35
median latency
38 ms
uptime
99.99%

Installation

$ pnpm dlx shadcn@latest add @ballmac/globe

Usage

import { Globe } from "@/components/ballmac/globe"

The full example is in the Code tab above.

Examples

Hero horizon

Edge network

Fast everywhere your users are.

API reference

PropTypeDefault
markers

Points drawn on the globe, such as regions or offices.

GlobeMarker[][]
baseColor

Color of the land dots. A CSS variable name ("--muted-foreground") or any CSS color.

string—
markerColor

Color of the markers.

string"--chart-1"
glowColor

Color of the atmosphere glow around the edge.

string—
speed

Radians per frame of automatic rotation. Off under reduced motion.

number0.0032
phi

Starting longitude rotation in radians.

number0
theta

Tilt toward the viewer in radians.

number0.28
mapBrightness

Brightness of land dots (cobe mapBrightness).

number—
mapSamples

Number of land dots sampled on the sphere; higher is finer and slower.

number16000
interactive

Let people rotate the globe by dragging or with the arrow keys.

booleantrue
label

Accessible description of what the globe shows.

string—

Also accepts the standard attributes of its root element.

Accessibility

KeyAction
Arrow Left / Arrow RightSpins the globe
Arrow Up / Arrow DownTilts the globe; it settles back

Use with AI

Render <Globe markers={[{ location: [lat, lng], size: 0.06 }]} /> in a sized container (it is a square, w-full, max 600px). The canvas has role=img and an aria-label; pass label to describe what it shows. It starts WebGL only when scrolled near the viewport. With the shadcn MCP server set up (guide), ask your agent:

Add the Ballmac UI Globe (@ballmac/globe) to this project with the shadcn MCP, then use it where it fits.

Use it for

  • Showing global reach: regions, edge locations, offices, customers by country
  • A hero or feature-card visual for infrastructure, networking or travel products

Not for

  • Precise geographic data or choropleths (use a real map library)
  • Several globes on one page; each is a WebGL context

Registry JSON: https://ui.ballmac.com/r/globe.json

Credits

Free to use in personal and commercial projects.