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

Quality scorecard

7/7

Every applicable check passes

Measured in Chromium 153.0.8010.12 on October 19, 2026, on version 1.0.0, across 2 examples.

How we measure
  • Passed: Accessibility scan

    No serious or critical issues in light and dark, on a phone and a desktop (axe-core 4.13.0, WCAG 2.1 AA and best-practice rules).

  • Passed: Small screens

    No sideways scrolling at 360, 390 or 1280 px wide.

  • Passed: Reduced motion

    No endless animation to begin with.

  • Passed: Right to left

    Mirrors correctly in Arabic, Hebrew, Persian and Urdu layouts (0% of elements off the mirror, limit 15%).

  • Passed: Clean console

    No console errors or React hydration errors while loading.

  • Passed: Keyboard

    2 tab stops, each showing a visible change when it takes focus. 2 documented keys.

  • Not applicable: Loading, empty and error

    Does not show data or take submissions.

  • Passed: Automated tests

    Covered by globe.test.tsx.

  • For information: Footprint

    3.0 KB of source (gzip) in 1 file. Installs cobe.

Automated checks find a subset of problems and do not replace testing with a screen reader and a keyboard in your own app. What they miss.

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.

Ballmac UI Pro

Need the whole screen, not one piece?

311 premium blocks (dashboards, settings, calendars, mail, shops, onboarding), a private shadcn registry and Figma tokens. Blocks that show data come with loading, empty and error states built in.

Not ready? Try three Pro blocks free

Leave your email and the blocks appear right here, ready to copy. Yours to use in any project.